{"version":3,"file":"commerce-component-register-bulk-subscription-pricing-register-js.94eac7547c5b46c9e68d.js?ssi=0","mappings":";qKAOAA,EAAA,CACA,IACAC,MAAA,CACA,uHAEAC,QAAA,aAEA,IACAD,MAAA,CACA,0FAEAC,QAAA,aAEA,IACAD,MAAA,CACA,+FAEAC,QAAA,aAEA,IAAUD,MAAA,4BAAAC,QAAA,cAEV,SAAAC,GAAAC,KAAsBA,EAAA,MAAAC,IACtB,MAAAJ,MAAUA,EAAAC,QAAAA,IAAmB,EAAAI,EAAAC,GAAiBP,EAAA,iBAAAI,EAAAA,EAAA,IAC9C,OAAyBI,EAAAC,cAAoBH,EAAAI,EAAI,CAAIN,OAAAF,aAAAG,GAAyBJ,EAAAU,IAAA,CAAAC,EAAAC,IAAsCL,EAAAC,cAAmB,QAAWK,IAAAD,EAAAD,IAAAG,KAAA,kBAClJ,0DCvBA,SAAAC,EAAAC,EAAAC,EAAAC,GACA,MAAUH,2BAAAI,EAAsCC,EAAAC,IAAuB,EAAAC,EAAAC,MACvE,OAAAJ,EAAAH,EAAAC,EAAAC,EACA,sICcA,SAAAM,GAAAC,QACAA,EAAAC,oBACAA,EAAAC,mBACAA,EAAAC,0BACAA,EAAAC,oBACAA,EAAAC,kBACAA,EAAA,GAAAC,uBACAA,EAAAC,gBACAA,EAAAC,uBACAA,EAAAC,uBACAA,EAAAC,uBACAA,EAAAC,uBACAA,EAAAC,sBACAA,EAAAC,gBACAA,EAAAC,gBACAA,EAAAC,UACAA,EACA,cAAAC,IAEA,MAAAC,EAAA,CACAhB,EAAA,CAA4BiB,MAAAjB,EAAAkB,YAAA,WAAqD,KACjFjB,EAAA,CACAgB,MAAAhB,EACAiB,YAAA,SACAC,aAAAjB,GACM,MACNkB,OAAAC,GAAA,OAAAA,IACAC,EAAAC,IAA0C,EAAAC,EAAAC,UAC1CT,EAAAU,KAAAL,GAAAA,EAAAH,cAAAf,IAAAe,aAAAF,EAAA,IAAAE,aAAA,YAEAS,EAAAC,IAAgD,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ACAC,WAAA,sEAEA,CACAV,KAAA,yBACAC,aAAA,4BACAQ,KAAA,SACAK,UAAA,EACAJ,WAAA,wDAEA,CACAV,KAAA,wBACAC,aAAA,2BACAQ,KAAA,SACAK,UAAA,EACAJ,WAAA,oDAEA,CACAV,KAAA,kBACAC,aAAA,oBACAQ,KAAA,SACAK,UAAA,EACAJ,WAAA,0CAEA,CACAV,KAAA,kBACAC,aAAA,oBACAQ,KAAA,SACAK,UAAA,EACAJ,WAAA,8GCnKA,SAAAK,EAAAC,GACA,MAAA1E,mBAAUA,IAAuB,EAAA2E,EAAAC,OACjCC,iBAAUA,IAAqB,EAAAC,EAAAC,MAyB/B,OACAC,gBAzBA,CAAAC,EAAAC,EAAA,KACAlF,GACAA,EAAA,CACAmF,MAAA,EAAgBC,WAAAH,EAAAd,KAAA,MAAAe,gBAuBhBG,qBApBAC,IACAT,GACAA,EAAAS,IAmBAvF,qBAjBA,CAAA/D,EAAAkJ,EAAA,EAAAjJ,KACA+D,GACAA,EACA,CACAmF,MAAA,EAAkBC,WAAApJ,EAAAmI,KAAA,QAAAe,aAClBjJ,eAEA,CACAsJ,UAAA,KACAb,IAAA1I,OASAgE,qBACA6E,mBAEA","sources":["webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-75F2PVSZ.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-NC3UEGS4.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-S4APGFFO.js","webpack://@logos/commerceweb-frontend/javascript/node_modules/lucide-react/dist/esm/icons/credit-card.mjs","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-QDZ2WSAW.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-YKNRUA43.js"],"sourcesContent":["import {\n  Icon,\n  selectIconVariant\n} from \"./chunk-5AEEBCQE.js\";\n\n// src/icons/navigation/expand-icon.tsx\nimport React from \"react\";\nvar VARIANTS = {\n  \"12\": {\n    paths: [\n      \"M6.02148 9.48926L0.0214844 4.12379L0.731057 3.48926L6.02148 8.2202L11.3119 3.48926L12.0215 4.12379L6.02148 9.48926Z\"\n    ],\n    viewBox: \"0 0 13 12\"\n  },\n  \"16\": {\n    paths: [\n      \"M8 12.6768L0.5 5.7962L1.17521 5.17676L8 11.4379L14.8248 5.17676L15.5 5.7962L8 12.6768Z\"\n    ],\n    viewBox: \"0 0 16 16\"\n  },\n  \"24\": {\n    paths: [\n      \"M12 20.2651L0.5 9.71494L1.53531 8.76514L12 18.3655L22.4647 8.76514L23.5 9.71494L12 20.2651Z\"\n    ],\n    viewBox: \"0 0 24 24\"\n  },\n  \"32\": { paths: [\"M31 12.5L16 27.5L1 12.5\"], viewBox: \"0 0 32 32\" }\n};\nfunction ExpandIcon({ size = 24, ...props }) {\n  const { paths, viewBox } = selectIconVariant(VARIANTS, typeof size === \"number\" ? size : 24);\n  return /* @__PURE__ */ React.createElement(Icon, { size, viewBox, ...props }, paths.map((d, i) => /* @__PURE__ */ React.createElement(\"path\", { key: i, d, fill: \"currentColor\" })));\n}\n\nexport {\n  ExpandIcon\n};\n//# sourceMappingURL=chunk-75F2PVSZ.js.map","import {\n  useSubscriptionContext\n} from \"./chunk-S5VM5FVP.js\";\nimport {\n  useEmptyDataResult\n} from \"./chunk-4GZNZVEG.js\";\n\n// src/hooks/use-subscription-product-data.ts\nfunction useSubscriptionProductData(spoid, couponCodes, isMultiAnnual) {\n  const { useSubscriptionProductData: useImpl = useEmptyDataResult } = useSubscriptionContext();\n  return useImpl(spoid, couponCodes, isMultiAnnual);\n}\n\nexport {\n  useSubscriptionProductData\n};\n//# sourceMappingURL=chunk-NC3UEGS4.js.map","import {\n  useSubscriptionProductData\n} from \"./chunk-NC3UEGS4.js\";\nimport {\n  PricingSlider\n} from \"./chunk-SFOCRRU5.js\";\nimport {\n  Checkbox\n} from \"./chunk-L2JNFYSR.js\";\nimport {\n  useProductCardActions\n} from \"./chunk-YKNRUA43.js\";\nimport {\n  Button\n} from \"./chunk-NXVEBOBO.js\";\nimport {\n  Typography\n} from \"./chunk-P4MY4MXU.js\";\nimport {\n  cn\n} from \"./chunk-NZVMNINS.js\";\n\n// src/components/bulk-subscription-pricing/component.tsx\nimport React, { useState } from \"react\";\nimport * as RadioGroup from \"@radix-ui/react-radio-group\";\nfunction BulkSubscriptionPricing({\n  heading,\n  monthlyBillingLabel,\n  annualBillingLabel,\n  annualBillingSavingsLabel,\n  defaultBillingValue,\n  attendanceOptions = [],\n  defaultAttendanceValue,\n  attendanceLabel,\n  confirmAttendanceTitle,\n  confirmAttendanceLabel,\n  confirmAttendanceError,\n  billingPeriodAriaLabel,\n  priceLoadingAriaLabel,\n  sliderAriaLabel,\n  selectAriaLabel,\n  className,\n  \"data-testid\": testId\n}) {\n  const billingOptions = [\n    monthlyBillingLabel ? { label: monthlyBillingLabel, billingType: \"monthly\" } : null,\n    annualBillingLabel ? {\n      label: annualBillingLabel,\n      billingType: \"annual\",\n      savingsLabel: annualBillingSavingsLabel\n    } : null\n  ].filter((o) => o !== null);\n  const [billingValue, setBillingValue] = useState(\n    billingOptions.find((o) => o.billingType === defaultBillingValue)?.billingType ?? billingOptions[0]?.billingType ?? \"monthly\"\n  );\n  const [attendanceValue, setAttendanceValue] = useState(\n    attendanceOptions.find((o) => o.value === defaultAttendanceValue)?.value ?? attendanceOptions[0]?.value ?? \"\"\n  );\n  const [isCertified, setIsCertified] = useState(false);\n  const [showCertificationError, setShowCertificationError] = useState(false);\n  const billingType = billingValue;\n  const selectedTier = attendanceOptions.find((o) => o.value === attendanceValue);\n  const resolvedTier = selectedTier ? billingType === \"annual\" ? {\n    spoid: selectedTier.spoidAnnual,\n    alternatePrice: selectedTier.annualAlternateDisplayValue,\n    ctaText: selectedTier.ctaTextAnnual,\n    ctaHref: selectedTier.ctaHrefAnnual\n  } : {\n    spoid: selectedTier.spoidMonthly,\n    alternatePrice: selectedTier.monthlyAlternateDisplayValue,\n    ctaText: selectedTier.ctaTextMonthly,\n    ctaHref: selectedTier.ctaHrefMonthly\n  } : null;\n  const { data: priceData, isLoading: isPriceLoading } = useSubscriptionProductData(\n    resolvedTier?.spoid\n  );\n  const { handleAddSpoidToCart, onAddToCartRequest } = useProductCardActions();\n  const currentPrice = priceData?.pricePerMonth ?? resolvedTier?.alternatePrice;\n  const currentCtaText = resolvedTier?.ctaText;\n  const currentCtaHref = resolvedTier?.ctaHref;\n  const handleBillingChange = (value) => {\n    setBillingValue(value);\n  };\n  const handleAttendanceChange = (value) => {\n    setAttendanceValue(value);\n  };\n  const handleCertificationChange = (event) => {\n    setIsCertified(event.target.checked);\n    if (event.target.checked) {\n      setShowCertificationError(false);\n    }\n  };\n  const handleCtaClick = (event) => {\n    if (requiresCertification && !isCertified) {\n      event.preventDefault();\n      setShowCertificationError(true);\n    }\n  };\n  const handleCtaButtonClick = () => {\n    if (requiresCertification && !isCertified) {\n      setShowCertificationError(true);\n      return;\n    }\n    handleAddSpoidToCart(resolvedTier?.spoid ?? \"\");\n  };\n  const sliderOptions = attendanceOptions.map((o) => ({ label: o.label, value: o.value }));\n  const hasConfirmationSection = Boolean(confirmAttendanceTitle || confirmAttendanceLabel);\n  const requiresCertification = Boolean(confirmAttendanceLabel);\n  return /* @__PURE__ */ React.createElement(\n    \"div\",\n    {\n      className: cn(\"tw-preflight gap-sp36 flex flex-col rounded bg-white\", className),\n      \"data-testid\": testId\n    },\n    heading && /* @__PURE__ */ React.createElement(Typography, { variant: \"headingH3\", tag: \"h3\", className: \"text-foreground\" }, heading.split(/\\\\n|\\n/).map((line, i, arr) => /* @__PURE__ */ React.createElement(React.Fragment, { key: i }, line, i < arr.length - 1 && /* @__PURE__ */ React.createElement(\"br\", null)))),\n    billingOptions.length > 0 && /* @__PURE__ */ React.createElement(\n      RadioGroup.Root,\n      {\n        value: billingValue,\n        onValueChange: handleBillingChange,\n        \"aria-label\": billingPeriodAriaLabel,\n        className: \"gap-sp6 flex flex-col\",\n        \"data-testid\": \"billing-options\"\n      },\n      billingOptions.map((option) => {\n        const isActive = option.billingType === billingValue;\n        return /* @__PURE__ */ React.createElement(\n          RadioGroup.Item,\n          {\n            key: option.billingType,\n            value: option.billingType,\n            \"aria-label\": option.savingsLabel ? `${option.label} ${option.savingsLabel}` : option.label,\n            className: cn(\n              \"gap-sp6 px-sp12 py-sp8 flex w-full cursor-pointer items-center rounded-lg text-left\",\n              \"duration-short transition-colors motion-reduce:transition-none\",\n              \"hover:outline-2 hover:outline-offset-1 hover:outline-current\",\n              \"focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-current\",\n              \"active:opacity-80\",\n              \"disabled:pointer-events-none disabled:opacity-50\",\n              isActive ? \"border-border-strong border-2\" : \"border-surface-tint border\"\n            )\n          },\n          /* @__PURE__ */ React.createElement(\n            \"span\",\n            {\n              \"aria-hidden\": true,\n              className: \"border-border-strong relative flex size-4 shrink-0 items-center justify-center rounded-full border\"\n            },\n            isActive && /* @__PURE__ */ React.createElement(\"span\", { className: \"bg-surface-inverse size-2 rounded-full\" })\n          ),\n          /* @__PURE__ */ React.createElement(\"span\", { className: \"flex-1\" }, /* @__PURE__ */ React.createElement(Typography, { variant: \"ui2\", tag: \"span\", className: \"text-foreground block\" }, option.label), option.savingsLabel && /* @__PURE__ */ React.createElement(Typography, { variant: \"ui3\", tag: \"span\", className: \"text-foreground block\" }, option.savingsLabel))\n        );\n      })\n    ),\n    sliderOptions.length > 0 && /* @__PURE__ */ React.createElement(\n      PricingSlider,\n      {\n        options: sliderOptions,\n        value: attendanceValue,\n        onValueChange: handleAttendanceChange,\n        label: attendanceLabel ?? \"\",\n        sliderAriaLabel,\n        selectAriaLabel\n      }\n    ),\n    /* @__PURE__ */ React.createElement(\"div\", { className: \"gap-sp24 flex flex-col\" }, isPriceLoading ? /* @__PURE__ */ React.createElement(\n      \"div\",\n      {\n        role: \"status\",\n        \"aria-label\": priceLoadingAriaLabel,\n        className: \"bg-surface-tint h-8 w-32 animate-pulse rounded motion-reduce:animate-none\"\n      }\n    ) : currentPrice && /* @__PURE__ */ React.createElement(Typography, { variant: \"headingH4\", tag: \"p\", className: \"text-foreground\" }, currentPrice), hasConfirmationSection && /* @__PURE__ */ React.createElement(\n      \"div\",\n      {\n        className: cn(\n          \"gap-sp10 p-sp16 flex flex-col border\",\n          showCertificationError ? \"border-invalid\" : \"border-border-strong\"\n        ),\n        \"data-testid\": \"confirmation-section\"\n      },\n      confirmAttendanceTitle && /* @__PURE__ */ React.createElement(Typography, { variant: \"ui3\", tag: \"p\", className: \"text-foreground font-semibold\" }, confirmAttendanceTitle),\n      confirmAttendanceLabel && /* @__PURE__ */ React.createElement(\n        Checkbox,\n        {\n          label: confirmAttendanceLabel,\n          variant: \"secondary\",\n          typography: \"bodySmall\",\n          checked: isCertified,\n          onChange: handleCertificationChange,\n          \"aria-invalid\": showCertificationError,\n          \"data-testid\": \"certification-checkbox\"\n        }\n      ),\n      showCertificationError && confirmAttendanceError && /* @__PURE__ */ React.createElement(Typography, { variant: \"ui3\", tag: \"p\", className: \"text-invalid\", role: \"alert\" }, confirmAttendanceError)\n    ), currentCtaText && (currentCtaHref ? /* @__PURE__ */ React.createElement(Button, { asChild: true, variant: \"primary\", scale: \"large\", className: \"w-full justify-center\" }, /* @__PURE__ */ React.createElement(\"a\", { href: currentCtaHref, onClick: handleCtaClick, \"data-testid\": \"cta-button\" }, currentCtaText)) : onAddToCartRequest && resolvedTier?.spoid ? /* @__PURE__ */ React.createElement(\n      Button,\n      {\n        variant: \"primary\",\n        scale: \"large\",\n        className: \"w-full justify-center\",\n        onClick: handleCtaButtonClick,\n        \"data-testid\": \"cta-button\"\n      },\n      currentCtaText\n    ) : null))\n  );\n}\n\nexport {\n  BulkSubscriptionPricing\n};\n//# sourceMappingURL=chunk-S4APGFFO.js.map","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n  [\"rect\", { width: \"20\", height: \"14\", x: \"2\", y: \"5\", rx: \"2\", key: \"ynyp8z\" }],\n  [\"line\", { x1: \"2\", x2: \"22\", y1: \"10\", y2: \"10\", key: \"1b3vmo\" }]\n];\nconst CreditCard = createLucideIcon(\"credit-card\", __iconNode);\n\nexport { __iconNode, CreditCard as default };\n//# sourceMappingURL=credit-card.mjs.map\n","import {\n  BulkSubscriptionPricing\n} from \"./chunk-S4APGFFO.js\";\nimport {\n  lucideIconUri\n} from \"./chunk-BEFWWR2C.js\";\nimport {\n  getStorybookDocsUrlForMolecule\n} from \"./chunk-QJ7P73DS.js\";\n\n// src/components/bulk-subscription-pricing/register.tsx\nimport { Builder } from \"@builder.io/react\";\nimport { CreditCard } from \"lucide-react\";\nvar registerComponent = () => {\n  Builder.registerComponent(BulkSubscriptionPricing, {\n    name: \"BulkSubscriptionPricing\",\n    friendlyName: \"Bulk Subscription Pricing\",\n    docsLink: getStorybookDocsUrlForMolecule(\"bulk-subscription-pricing\"),\n    image: lucideIconUri(CreditCard),\n    inputs: [\n      {\n        name: \"heading\",\n        friendlyName: \"Heading\",\n        type: \"string\",\n        helperText: 'Card title shown at the top. Use \\\\n to insert a line break (e.g. \"Logos\\\\nfor Church\").'\n      },\n      {\n        name: \"monthlyBillingLabel\",\n        friendlyName: \"Monthly Billing Label\",\n        type: \"string\",\n        helperText: 'Label for the \"billed monthly\" radio option (e.g. \"Annual Billed Monthly\"). Leave empty to hide this option.'\n      },\n      {\n        name: \"annualBillingLabel\",\n        friendlyName: \"Annual Billing Label\",\n        type: \"string\",\n        helperText: 'Label for the \"billed annually\" radio option (e.g. \"Billed Annually\"). Leave empty to hide this option.'\n      },\n      {\n        name: \"defaultBillingValue\",\n        friendlyName: \"Default Billing Type\",\n        type: \"string\",\n        enum: [\"monthly\", \"annual\"],\n        helperText: \"Which billing type is selected on first render.\"\n      },\n      {\n        name: \"attendanceOptions\",\n        friendlyName: \"Attendance Options\",\n        type: \"list\",\n        helperText: 'One entry per pricing tier shown in the slider. Set a SPOID for live pricing via CommerceComponentsContext. Set a CTA URL to navigate on click; omit it to use onAddToCartRequest from context instead. For non-purchasable tiers (e.g. \"Contact us\"), set an Alternate Display Value and omit the SPOID.',\n        subFields: [\n          {\n            name: \"label\",\n            friendlyName: \"Label\",\n            type: \"string\",\n            required: true,\n            helperText: 'Text shown in the dropdown and slider (e.g. \"Up to 100\").'\n          },\n          {\n            name: \"value\",\n            friendlyName: \"Value\",\n            type: \"string\",\n            required: true,\n            helperText: \"Unique key for this tier.\"\n          },\n          {\n            name: \"spoidMonthly\",\n            friendlyName: \"SPOID (Monthly)\",\n            type: \"string\",\n            helperText: \"Subscription Product Option ID for monthly billing. Requires getSubscriptionProductData to be provided in CommerceComponentsContext to fetch live pricing.\"\n          },\n          {\n            name: \"spoidAnnual\",\n            friendlyName: \"SPOID (Annual)\",\n            type: \"string\",\n            helperText: \"Subscription Product Option ID for annual billing. Requires getSubscriptionProductData to be provided in CommerceComponentsContext to fetch live pricing.\"\n          },\n          {\n            name: \"ctaTextMonthly\",\n            friendlyName: \"CTA Text (Monthly)\",\n            type: \"string\",\n            helperText: \"Button label for monthly billing.\"\n          },\n          {\n            name: \"ctaHrefMonthly\",\n            friendlyName: \"CTA URL (Monthly)\",\n            type: \"string\",\n            helperText: \"Button destination for monthly billing. When omitted, the CTA uses onAddToCartRequest from CommerceComponentsContext with the tier's SPOID.\"\n          },\n          {\n            name: \"ctaTextAnnual\",\n            friendlyName: \"CTA Text (Annual)\",\n            type: \"string\",\n            helperText: \"Button label for annual billing.\"\n          },\n          {\n            name: \"ctaHrefAnnual\",\n            friendlyName: \"CTA URL (Annual)\",\n            type: \"string\",\n            helperText: \"Button destination for annual billing. When omitted, the CTA uses onAddToCartRequest from CommerceComponentsContext with the tier's SPOID.\"\n          },\n          {\n            name: \"monthlyAlternateDisplayValue\",\n            friendlyName: \"Monthly Alternate Display Value\",\n            type: \"string\",\n            helperText: 'Price label for tiers that are not purchasable online and have no SPOID (e.g. \"Contact us\" for enterprise tiers). Leave blank for standard tiers \\u2014 those should use a SPOID so the price comes from the backend.'\n          },\n          {\n            name: \"annualAlternateDisplayValue\",\n            friendlyName: \"Annual Alternate Display Value\",\n            type: \"string\",\n            helperText: 'Price label for tiers that are not purchasable online and have no SPOID (e.g. \"Contact us\" for enterprise tiers). Leave blank for standard tiers \\u2014 those should use a SPOID so the price comes from the backend.'\n          }\n        ]\n      },\n      {\n        name: \"defaultAttendanceValue\",\n        friendlyName: \"Default Attendance Value\",\n        type: \"string\",\n        helperText: \"Value of the attendance tier selected on first render.\"\n      },\n      {\n        name: \"attendanceLabel\",\n        friendlyName: \"Attendance Label\",\n        type: \"string\",\n        helperText: \"Label shown beside the attendance selector.\"\n      },\n      {\n        name: \"confirmAttendanceTitle\",\n        friendlyName: \"Confirmation Section Title\",\n        type: \"string\",\n        helperText: 'Title for the confirmation checkbox section (e.g. \"Confirm Attendance\").'\n      },\n      {\n        name: \"confirmAttendanceLabel\",\n        friendlyName: \"Confirmation Checkbox Label\",\n        type: \"string\",\n        helperText: `Label text for the confirmation checkbox (e.g. \"I certify I have selected my church's true average weekly attendance.\").`\n      },\n      {\n        name: \"confirmAttendanceError\",\n        friendlyName: \"Confirmation Error Message\",\n        type: \"string\",\n        helperText: \"Validation error shown when the CTA is clicked without confirming.\"\n      },\n      {\n        name: \"billingPeriodAriaLabel\",\n        friendlyName: \"Billing Period Aria Label\",\n        type: \"string\",\n        advanced: true,\n        helperText: \"Accessible label for the billing period radio group.\"\n      },\n      {\n        name: \"priceLoadingAriaLabel\",\n        friendlyName: \"Price Loading Aria Label\",\n        type: \"string\",\n        advanced: true,\n        helperText: \"Accessible label for the price loading skeleton.\"\n      },\n      {\n        name: \"sliderAriaLabel\",\n        friendlyName: \"Slider Aria Label\",\n        type: \"string\",\n        advanced: true,\n        helperText: \"Accessible label for the slider thumb.\"\n      },\n      {\n        name: \"selectAriaLabel\",\n        friendlyName: \"Select Aria Label\",\n        type: \"string\",\n        advanced: true,\n        helperText: \"Accessible label for the attendance dropdown.\"\n      }\n    ]\n  });\n};\n\nexport {\n  registerComponent\n};\n//# sourceMappingURL=chunk-QDZ2WSAW.js.map","import {\n  useWishlistContext\n} from \"./chunk-7XYRTJIF.js\";\nimport {\n  useCartContext\n} from \"./chunk-SJPYXIYS.js\";\n\n// src/hooks/use-product-card-actions.ts\nfunction useProductCardActions(addSpoidToCartSuccessHandler) {\n  const { onAddToCartRequest } = useCartContext();\n  const { onWishlistToggle } = useWishlistContext();\n  const handleAddToCart = (skuId, quantity = 1) => {\n    if (!onAddToCartRequest) return;\n    onAddToCartRequest({\n      items: [{ identifier: skuId, type: \"SKU\" /* SKU */, quantity }]\n    });\n  };\n  const handleWishlistToggle = (id) => {\n    if (!onWishlistToggle) return;\n    onWishlistToggle(id);\n  };\n  const handleAddSpoidToCart = (spoid, quantity = 1, couponCodes) => {\n    if (!onAddToCartRequest) return;\n    onAddToCartRequest(\n      {\n        items: [{ identifier: spoid, type: \"SPOID\" /* SPOID */, quantity }],\n        couponCodes\n      },\n      {\n        onSuccess: () => {\n          addSpoidToCartSuccessHandler?.(spoid);\n        }\n      }\n    );\n  };\n  return {\n    handleAddToCart,\n    handleWishlistToggle,\n    handleAddSpoidToCart,\n    onAddToCartRequest,\n    onWishlistToggle\n  };\n}\n\nexport {\n  useProductCardActions\n};\n//# sourceMappingURL=chunk-YKNRUA43.js.map"],"names":["VARIANTS","paths","viewBox","ExpandIcon","size","props","_chunk_5AEEBCQE_js__WEBPACK_IMPORTED_MODULE_0__","z","react__WEBPACK_IMPORTED_MODULE_1__","createElement","I","map","d","i","key","fill","useSubscriptionProductData","spoid","couponCodes","isMultiAnnual","useImpl","_chunk_4GZNZVEG_js__WEBPACK_IMPORTED_MODULE_1__","G","_chunk_S5VM5FVP_js__WEBPACK_IMPORTED_MODULE_0__","ue","BulkSubscriptionPricing","heading","monthlyBillingLabel","annualBillingLabel","annualBillingSavingsLabel","defaultBillingValue","attendanceOptions","defaultAttendanceValue","attendanceLabel","confirmAttendanceTitle","confirmAttendanceLabel","confirmAttendanceError","billingPeriodAriaLabel","priceLoadingAriaLabel","sliderAriaLabel","selectAriaLabel","className","testId","billingOptions","label","billingType","savingsLabel","filter","o","billingValue","setBillingValue","react","useState","find","attendanceValue","setAttendanceValue","value","isCertified","setIsCertified","showCertificationError","setShowCertificationError","selectedTier","resolvedTier","spoidAnnual","alternatePrice","annualAlternateDisplayValue","ctaText","ctaTextAnnual","ctaHref","ctaHrefAnnual","spoidMonthly","monthlyAlternateDisplayValue","ctaTextMonthly","ctaHrefMonthly","data","priceData","isLoading","isPriceLoading","chunk_NC3UEGS4","A","handleAddSpoidToCart","onAddToCartRequest","chunk_YKNRUA43","_","currentPrice","pricePerMonth","currentCtaText","currentCtaHref","sliderOptions","hasConfirmationSection","Boolean","requiresCertification","chunk_NZVMNINS","cn","chunk_P4MY4MXU","variant","tag","split","line","arr","Fragment","length","dist","bL","onValueChange","option","isActive","q7","chunk_SFOCRRU5","k","options","role","chunk_L2JNFYSR","S","typography","checked","onChange","event","target","chunk_NXVEBOBO","$n","asChild","scale","href","onClick","preventDefault","CreditCard","width","height","x","y","rx","x1","x2","y1","y2","registerComponent","builder_react_es5","M$","name","friendlyName","docsLink","chunk_QJ7P73DS","Im","image","chunk_BEFWWR2C","c","inputs","type","helperText","enum","subFields","required","advanced","useProductCardActions","addSpoidToCartSuccessHandler","_chunk_SJPYXIYS_js__WEBPACK_IMPORTED_MODULE_1__","B_","onWishlistToggle","_chunk_7XYRTJIF_js__WEBPACK_IMPORTED_MODULE_0__","Em","handleAddToCart","skuId","quantity","items","identifier","handleWishlistToggle","id","onSuccess"],"sourceRoot":""}