{"version":3,"file":"use-store-ta7qAwIc.mjs","names":[],"sources":["../src/hooks/use-store.ts"],"sourcesContent":["import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useStoreApi } from \"@fluid-app/portal-core/store-api-context\";\nimport type { Store } from \"@fluid-app/portal-core/store-types\";\nimport {\n  STORE_QUERY_KEY,\n  STORE_STALE_TIME,\n  fetchStoreQuery,\n} from \"@fluid-app/portal-react/hooks/use-optional-store\";\n\n/**\n * Fetches the tenant store branding from GET /api/store. Requires a\n * StoreApiProvider (throws otherwise) — use `useOptionalStore()` from\n * portal-react in contexts where the provider may be absent.\n */\nexport function useStore(): UseQueryResult<Store> {\n  const api = useStoreApi();\n\n  return useQuery({\n    queryKey: STORE_QUERY_KEY,\n    queryFn: fetchStoreQuery(api),\n    staleTime: STORE_STALE_TIME,\n  });\n}\n"],"mappings":";;;;;;;;AAcA,SAAgB,WAAkC;AAGhD,QAAO,SAAS;EACd,UAAU;EACV,SAAS,gBAJC,aAAa,CAIM;EAC7B,WAAW;EACZ,CAAC"}