{"version":3,"file":"RatingContext.mjs","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":["RatingContext","createContext","undefined","useRatingContext","context","useContext","Error"],"mappings":";AAWaA,MAAAA,IAAgBC,EAAyCC,MAAS;AAExE,SAAAC,IAAA;AACLC,QAAAA,IAAgBC,EAAAL,CAAwB;AAAE,MAAA,CAErCI;AAAOE,UAAAA,IAAAA,MACM,oEAAoE;AAG/EF,SAAAA;AAAO;"}