{"version":3,"file":"useFetchBrandGroups.CpPFh6o7.mjs","names":[],"sources":["https:/asset.29cm.co.kr/contents/framer/apis/brand-group/BrandGroupApiService.js","https:/asset.29cm.co.kr/contents/framer/hooks/fetchers/useFetchBrandGroups.js"],"sourcesContent":["import { env } from \"../../config/index.js\";\nimport { throwFailError } from \"../@middlewares/throwFailError.js\";\nimport { APIService } from \"../APIService.js\";\nclass BrandGroupApiService extends APIService {\n  constructor() {\n    super();\n    this.setMiddleware(throwFailError);\n  }\n  async getBrandGroups({\n    brandGroupIds\n  }) {\n    return this.post(`${env.api.content}/api/v4/brand-groups/front-brands`, brandGroupIds);\n  }\n}\nconst brandGroupApi = new BrandGroupApiService();\nexport {\n  brandGroupApi\n};\n","import useSWR from \"../../node_modules/swr/core/dist/index.js\";\nimport { brandGroupApi } from \"../../apis/brand-group/BrandGroupApiService.js\";\nconst BRAND_GROUPS = \"brand-groups\";\nconst useFetchBrandGroups = (brandGroupIds, enabled = true) => {\n  const {\n    isLoading,\n    ...rest\n  } = useSWR(enabled ? [BRAND_GROUPS, brandGroupIds] : null, () => brandGroupApi.getBrandGroups({\n    brandGroupIds\n  }));\n  return {\n    isLoading: isLoading || !enabled,\n    ...rest\n  };\n};\nexport {\n  useFetchBrandGroups\n};\n"],"mappings":"gLAA4C,IACuB,IACrB,CACxC,EAAN,cAAmC,CAAW,CAC5C,aAAc,CACZ,OAAO,CACP,KAAK,cAAc,EAAe,CAEpC,MAAM,eAAe,CACnB,iBACC,CACD,OAAO,KAAK,KAAK,GAAG,EAAI,IAAI,QAAQ,mCAAoC,EAAc,GAGpF,EAAgB,IAAI,sBCdqC,IACgB,CACzE,EAAe,eACf,GAAuB,EAAe,EAAU,KAAS,CAC7D,GAAM,CACJ,YACA,GAAG,GACD,EAAO,EAAU,CAAC,EAAc,EAAc,CAAG,SAAY,EAAc,eAAe,CAC5F,gBACD,CAAC,CAAC,CACH,MAAO,CACL,UAAW,GAAa,CAAC,EACzB,GAAG,EACJ"}