{"version":3,"sources":["../src/utils/context/index.tsx"],"sourcesContent":["import React from 'react';\r\n\r\nimport type { ProviderProps } from './index.types';\r\n\r\nexport function createContext<ContextValueTypes>() {\r\n  const Context = React.createContext<ContextValueTypes | null>(null);\r\n\r\n  const useContext = () => {\r\n    const value = React.useContext(Context);\r\n\r\n    return value;\r\n  };\r\n\r\n  const Provider = (props: ProviderProps) => {\r\n    const { value, children } = props;\r\n\r\n    return <Context.Provider value={value}>{children}</Context.Provider>;\r\n  };\r\n\r\n  return [Provider, useContext] as const;\r\n}\r\n"],"mappings":";AAAA,OAAO,WAAW;AAgBP;AAZJ,SAAS,gBAAmC;AACjD,QAAM,UAAU,MAAM,cAAwC,IAAI;AAElE,QAAM,aAAa,MAAM;AACvB,UAAM,QAAQ,MAAM,WAAW,OAAO;AAEtC,WAAO;AAAA,EACT;AAEA,QAAM,WAAW,CAAC,UAAyB;AACzC,UAAM,EAAE,OAAO,SAAS,IAAI;AAE5B,WAAO,oBAAC,QAAQ,UAAR,EAAiB,OAAe,UAAS;AAAA,EACnD;AAEA,SAAO,CAAC,UAAU,UAAU;AAC9B;","names":[]}