import { Controller } from "react-hook-form" import { NestedForm } from "../../../../utils/nested-form" import Switch from "../../../atoms/switch" export type DiscountableFormType = { value: boolean } type Props = { form: NestedForm isGiftCard?: boolean } const DiscountableForm = ({ form, isGiftCard }: Props) => { const { control, path } = form return (

Discountable

{ return }} />

When unchecked discounts will not be applied to this{" "} {isGiftCard ? "gift card" : "product"}.

) } export default DiscountableForm