{"version":3,"sources":["../src/use-theme.ts"],"sourcesContent":["import { WithCSSVar } from \"@chakra-ui/styled-system\"\nimport { Dict } from \"@chakra-ui/utils\"\nimport { ThemeContext } from \"@emotion/react\"\nimport { useContext } from \"react\"\n\n/**\n * `useTheme` is a custom hook used to get the theme object from context.\n *\n * @see Docs https://chakra-ui.com/docs/hooks/use-theme\n */\nexport function useTheme() {\n const theme = useContext(\n ThemeContext as unknown as React.Context,\n )\n if (!theme) {\n throw Error(\n \"useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``\",\n )\n }\n\n return theme as WithCSSVar\n}\n"],"mappings":";;;AAEA,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAOpB,SAAS,WAAoC;AAClD,QAAM,QAAQ;AAAA,IACZ;AAAA,EACF;AACA,MAAI,CAAC,OAAO;AACV,UAAM;AAAA,MACJ;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}