{"version":3,"file":"useFetchCoupons.BHo8o4id.mjs","names":[],"sources":["https:/asset.29cm.co.kr/contents/framer/hooks/fetchers/useFetchCoupons.js"],"sourcesContent":["import useSWR from \"../../node_modules/swr/core/dist/index.js\";\nimport { couponApi } from \"../../apis/coupon/CouponApiService.js\";\nconst COUPONS_FETCHER_KEY = \"@coupon/coupons\";\nconst useFetchCoupons = (couponIdList, enabled = true, isDevMode = false) => {\n  const {\n    isLoading,\n    ...rest\n  } = useSWR(enabled ? [COUPONS_FETCHER_KEY, couponIdList] : null, () => couponApi.getCoupons(couponIdList, isDevMode), {\n    errorRetryCount: 2,\n    errorRetryInterval: 5e3,\n    revalidateIfStale: false,\n    revalidateOnFocus: false,\n    revalidateOnReconnect: false,\n    keepPreviousData: true\n  });\n  return {\n    ...rest,\n    isLoading: isLoading || !enabled\n  };\n};\nexport {\n  useFetchCoupons\n};\n"],"mappings":"iOAA+D,IACG,CAC5D,EAAsB,kBACtB,GAAmB,EAAc,EAAU,GAAM,EAAY,KAAU,CAC3E,GAAM,CACJ,YACA,GAAG,GACD,EAAO,EAAU,CAAC,EAAqB,EAAa,CAAG,SAAY,EAAU,WAAW,EAAc,EAAU,CAAE,CACpH,gBAAiB,EACjB,mBAAoB,IACpB,kBAAmB,GACnB,kBAAmB,GACnB,sBAAuB,GACvB,iBAAkB,GACnB,CAAC,CACF,MAAO,CACL,GAAG,EACH,UAAW,GAAa,CAAC,EAC1B"}