{"version":3,"file":"useAppElementContainerQuery.cjs","names":["_useContrastMode","require","_useContainerQuery","useAppElementContainerQuery","maxHeight","maxWidth","minHeight","minWidth","contrastContainerRef","useContrastModeContext","useContainerQuery","target","exports"],"sources":["../../../src/theme/useAppElementContainerQuery.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useContrastModeContext } from \"../useContrastMode.js\";\nimport {\n  useContainerQuery,\n  type UseContainerQueryProps,\n} from \"./useContainerQuery.js\";\n\nexport type UseAppElementContainerQueryProps = Omit<\n  UseContainerQueryProps,\n  \"target\"\n>;\n\n/**\n * Reports whether Odyssey's app wrapper element satisfies a container query. This is the app-scoped analog of `useMediaQuery`: bounds are matched against the wrapper's `inline-size` (width) and `block-size` (height) rather than the viewport, so responsiveness tracks the space Odyssey actually occupies (which shrinks as surrounding chrome such as a side nav expands). Returns `false` until the wrapper element exists, including when `OdysseyProvider` renders with `hasWrapperElement={false}` and when called outside a provider.\n */\nexport const useAppElementContainerQuery = ({\n  maxHeight,\n  maxWidth,\n  minHeight,\n  minWidth,\n}: UseAppElementContainerQueryProps) => {\n  const { contrastContainerRef } = useContrastModeContext();\n\n  return useContainerQuery({\n    maxHeight,\n    maxWidth,\n    minHeight,\n    minWidth,\n    target: contrastContainerRef ?? null,\n  });\n};\n"],"mappings":";;;;;;AAYA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAgBO,MAAME,2BAA2B,GAAGA,CAAC;EAC1CC,SAAS;EACTC,QAAQ;EACRC,SAAS;EACTC;AACgC,CAAC,KAAK;EACtC,MAAM;IAAEC;EAAqB,CAAC,GAAG,IAAAC,uCAAsB,EAAC,CAAC;EAEzD,OAAO,IAAAC,oCAAiB,EAAC;IACvBN,SAAS;IACTC,QAAQ;IACRC,SAAS;IACTC,QAAQ;IACRI,MAAM,EAAEH,oBAAoB,IAAI;EAClC,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAT,2BAAA,GAAAA,2BAAA","ignoreList":[]}