{"version":3,"file":"Panel.context.cjs","sources":["../../../../../src/components/overlay/panel/context/Panel.context.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\r\n\r\ntype PanelContextValue = {\r\n    titleId: string\r\n    hasTitle: boolean\r\n    withBackdrop: boolean\r\n    setHasTitle: (hasTitle: boolean) => void\r\n}\r\n\r\nexport const PanelContext = createContext<PanelContextValue | null>(null)\r\n\r\nexport const usePanelContext = (): PanelContextValue => {\r\n    const context = useContext(PanelContext)\r\n\r\n    if (!context) {\r\n        throw new Error('Panel components must be used within a Panel root.')\r\n    }\r\n\r\n    return context\r\n}\r\n"],"names":["PanelContext","createContext","usePanelContext","context","useContext"],"mappings":"yGASaA,EAAeC,EAAAA,cAAwC,IAAI,EAE3DC,EAAkB,IAAyB,CACpD,MAAMC,EAAUC,EAAAA,WAAWJ,CAAY,EAEvC,GAAI,CAACG,EACD,MAAM,IAAI,MAAM,oDAAoD,EAGxE,OAAOA,CACX"}