{"version":3,"file":"RandomDiscountValue.ORGGHmDd.mjs","names":["useState"],"sources":["https:/asset.29cm.co.kr/contents/framer/components/systems/RandomDiscountValue/RandomDiscountValue.js"],"sourcesContent":["import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { useState } from \"react\";\nimport { DiscountType } from \"../../../types/models/coupon.js\";\nimport \"../Countdown/Countdown.js\";\nimport \"react-dom\";\nimport \"../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../Expandable/Expandable.js\";\nimport \"../FixedScrollProgressBar/FixedScrollProgressBar.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 \"../../../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/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/preuser/PreuserApiService.js\";\nimport \"framer\";\nimport \"../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../Products/Products.js\";\nimport \"../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport \"../../../constants/snowplow/snowplowSchema.js\";\nimport \"../ResponsiveSplitView/ResponsiveSplitView.js\";\nimport \"../ResponsiveSplitViewOverlayButton/ResponsiveSplitViewOverlayButton.js\";\nimport { RollingNumber } from \"../RollingNumber/RollingNumber.js\";\nimport \"../TabBar/TabBar.js\";\nimport \"../TimeProgressBar/TimeProgressBar.js\";\nimport \"../ViewportContainer/ViewportContainer.js\";\nimport \"../TabBarV2/TabBarV2.js\";\nimport \"../TabBarV3/TabBarV3.js\";\nimport useInterval from \"../../../node_modules/react-use/esm/useInterval.js\";\nconst RandomDiscountValue = ({\n  discountType,\n  discountValues\n}) => {\n  const [index, setIndex] = useState(0);\n  useInterval(() => {\n    setIndex((index + 1) % discountValues.length);\n  }, 800);\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    display: \"flex\",\n    alignItems: \"center\"\n  }, children: [\n    /* @__PURE__ */ jsx(RollingNumber, { value: discountValues[index] ?? 0 }),\n    discountType === DiscountType.FIXED_RATE ? \"%\" : \"원\"\n  ] });\n};\nexport {\n  RandomDiscountValue\n};\n"],"mappings":"kzCAA8C,IACb,IAC8B,IAC5B,IAChB,IACqB,IACjB,IACc,IACwB,IACL,IACF,IACc,IAChB,IACyB,IACX,IACZ,IACc,IAClC,IACmD,IAC1B,IACP,IACpC,IACwD,IACvC,IACyB,IACM,IACU,IACR,IACM,IAC/B,IACU,IACI,IACA,IAC0B,IACf,IACrC,IACkB,IACI,IAClB,IACA,IAC4C,CACvE,GAAuB,CAC3B,eACA,oBACI,CACJ,GAAM,CAAC,EAAO,GAAYA,EAAS,EAAE,CAIrC,OAHA,MAAkB,CAChB,GAAU,EAAQ,GAAK,EAAe,OAAO,EAC5C,IAAI,CACgB,EAAK,MAAO,CAAE,MAAO,CAC1C,QAAS,OACT,WAAY,SACb,CAAE,SAAU,CACK,EAAI,EAAe,CAAE,MAAO,EAAe,IAAU,EAAG,CAAC,CACzE,IAAiB,EAAa,WAAa,IAAM,IAClD,CAAE,CAAC"}