import { useApp } from "../../../../hooks"; import clsx from "clsx"; import { SubscriptionBillingPeriod } from "../../../../application/enums/subscriptions/SubscriptionBillingPeriod"; interface Props { className?: string; billingPeriod: SubscriptionBillingPeriod; toggleBillingPeriod: () => void; yearlyDiscount: string | undefined; size?: "sm" | "md"; disabled?: boolean; } export default function ToggleBillingPeriod({ className, billingPeriod, toggleBillingPeriod, yearlyDiscount, size = "md", disabled }: Props) { const { t } = useApp(); function setBillingPeriod(item: SubscriptionBillingPeriod) { if (billingPeriod !== item) { toggleBillingPeriod(); } } return (