{
  "mappings": "AAGA,SAAS,YAAY,yBAAyB;AAE9C,OAAO,cAAM;AAIb,OAAO,iBAAS;KAgBX,gBAAgB,SAAS,0BAA0B,IAAI,IAAI;AAEhE,OAAO,iBAAS,eAAe,OAAO,QAAQ,QAAQ,gBAAgB",
  "names": [],
  "sources": [
    "src/index.ts"
  ],
  "version": 3,
  "sourcesContent": [
    "import * as React from 'react'\nimport { ClientOnlyContext } from './ClientOnly'\n\nexport { ClientOnly, ClientOnlyContext } from './ClientOnly'\n\nexport const useIsClientOnly = (): boolean => {\n  return React.useContext(ClientOnlyContext)\n}\n\nexport function useDidFinishSSR(): boolean {\n  const clientOnly = React.useContext(ClientOnlyContext)\n\n  if (clientOnly || process.env.TAMAGUI_TARGET === 'native') {\n    return true\n  }\n\n  return React.useSyncExternalStore(\n    subscribe,\n    () => true,\n    () => false\n  )\n}\n\nconst subscribe = () => () => {}\n\ntype FunctionOrValue<Value> = Value extends () => infer X ? X : Value\n\nexport function useClientValue<Value>(value?: Value): FunctionOrValue<Value> | undefined {\n  const done = useDidFinishSSR()\n  // @ts-expect-error this is fine but started to error in ts latest\n  return !done ? undefined : typeof value === 'function' ? value() : value\n}\n"
  ]
}