import { FC } from "react"
import { Bill } from "@/app/lib/db-types"
import Link from "next/link"

export interface BillBadgeProps {
    locationId: string,
    bill: Bill
};

export const BillBadge:FC<BillBadgeProps> = ({ locationId, bill: { _id: billId, name, paid, hasAttachment }}) =>
<Link href={`/bill/${locationId}-${billId}/edit`} className={`badge badge-lg ${paid?"badge-success":" badge-outline"} ${ !paid && hasAttachment ? "btn-outline btn-success" : "" }  cursor-pointer`}>
    {name}
</Link>;