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 }}) =>
<Link href={`/bills/${locationId}-${billId}/edit`} className={`badge badge-lg ${paid} ${paid?"badge-success":" badge-outline"} cursor-pointer`}>
    {name}
</Link>;