{"version":3,"file":"RatingContext.cjs","sources":["../../../../src/components/Rating/RatingContext.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext } from \"react\";\nimport type { FlowbiteRatingTheme } from \"./Rating\";\nimport type { FlowbiteStarSizes } from \"./RatingStar\";\n\nexport type RatingContext = {\n  theme: FlowbiteRatingTheme;\n  size?: keyof FlowbiteStarSizes;\n};\n\nexport const RatingContext = createContext<RatingContext | undefined>(undefined);\n\nexport function useRatingContext(): RatingContext {\n  const context = useContext(RatingContext);\n\n  if (!context) {\n    throw new Error(\"useRatingContext should be used within the RatingContext provider!\");\n  }\n\n  return context;\n}\n"],"names":["createContext","useContext"],"mappings":";;;;AAGY,MAAC,aAAa,GAAGA,mBAAa,CAAC,KAAK,CAAC,EAAE;AAC5C,SAAS,gBAAgB,GAAG;AACnC,EAAE,MAAM,OAAO,GAAGC,gBAAU,CAAC,aAAa,CAAC,CAAC;AAC5C,EAAE,IAAI,CAAC,OAAO,EAAE;AAChB,IAAI,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;AAC1F,GAAG;AACH,EAAE,OAAO,OAAO,CAAC;AACjB;;;;;"}