{"version":3,"file":"SubscriptionButton.CvmiMrTu.mjs","names":[],"sources":["https:/asset.29cm.co.kr/contents/framer/components/systems/curations/SubscriptionButton/SubscriptionButton.js"],"sourcesContent":["import { jsx } from \"react/jsx-runtime\";\nimport { SwitchButton } from \"../../../@shared/SwitchButton/SwitchButton.js\";\nimport \"react\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport { isCanvas } from \"../../../../utils/framer/isCanvas.js\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../hooks/stores/toast/toast.store.js\";\nimport { useTheme } from \"../../../../hooks/useTheme.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { useHandleSubscription } from \"./SubscriptionButton.hooks.js\";\nimport { ThemeProvider } from \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport { THEME_CONTROLS } from \"../../../../libs/property-controls/theme.js\";\nconst SubscriptionButton = ({\n  sectionKey = \"\",\n  activeColor,\n  eventKey,\n  restEventKeys = []\n}) => {\n  const theme = useTheme();\n  const {\n    isSubscribed,\n    toggleSubscription\n  } = useHandleSubscription({\n    sectionKey,\n    eventKey,\n    restEventKeys\n  });\n  const handleClick = () => {\n    toggleSubscription();\n  };\n  return /* @__PURE__ */ jsx(SwitchButton, { theme, active: isSubscribed || isCanvas(), activeColor, onClick: handleClick, children: \"알림 받기\" });\n};\nconst FramerSubscriptionButton = ({\n  theme,\n  ...rest\n}) => {\n  return /* @__PURE__ */ jsx(ThemeProvider, { theme, children: /* @__PURE__ */ jsx(SubscriptionButton, { ...rest }) });\n};\naddPropertyControls(FramerSubscriptionButton, {\n  ...THEME_CONTROLS,\n  activeColor: {\n    type: ControlType.Color,\n    title: \"활성화 상태 색상\",\n    description: \"버튼이 활성화 상태일 때의 색상 설정\",\n    optional: true\n  },\n  eventKey: {\n    type: ControlType.String,\n    title: \"알림 키\",\n    description: \"알림 기능을 활성화할 이벤트를 구분하기 위해 사전에 정의된 키를 입력합니다.\\n\\n키가 필요한 경우 전시콘텐츠팀에 문의해 주세요.\",\n    defaultValue: \"\"\n  }\n});\nexport {\n  FramerSubscriptionButton,\n  SubscriptionButton\n};\n"],"mappings":"4iBAAwC,IACqC,IAC9D,IACiE,IACX,IACZ,IACc,IAClC,IACyB,IAC0B,IACZ,IACT,IACD,IACjB,IACM,IACS,IACN,IACiB,IACd,IACF,IACF,IACc,IAChB,IACE,IACoB,IACR,IAClD,IACwB,IACpB,IACoD,IAC/B,IACU,IACgB,IACoB,IACb,CACvE,GAAsB,CAC1B,aAAa,GACb,cACA,WACA,gBAAgB,EAAE,IACd,CACJ,IAAM,EAAQ,GAAU,CAClB,CACJ,eACA,sBACE,EAAsB,CACxB,aACA,WACA,gBACD,CAAC,CAIF,OAAuB,EAAI,EAAc,CAAE,QAAO,OAAQ,GAAgB,GAAU,CAAE,cAAa,YAHzE,CACxB,GAAoB,EAEmG,SAAU,QAAS,CAAC,EAEzI,GAA4B,CAChC,QACA,GAAG,KAEoB,EAAI,EAAe,CAAE,QAAO,SAA0B,EAAI,EAAoB,CAAE,GAAG,EAAM,CAAC,CAAE,CAAC,CAEtH,EAAoB,EAA0B,CAC5C,GAAG,EACH,YAAa,CACX,KAAM,EAAY,MAClB,MAAO,YACP,YAAa,uBACb,SAAU,GACX,CACD,SAAU,CACR,KAAM,EAAY,OAClB,MAAO,OACP,YAAa;;4BACb,aAAc,GACf,CACF,CAAC"}