{"version":3,"file":"useHasUiShell.cjs","names":["_react","require","uiShellDataAttribute","exports","useHasUiShell","hasUiShell","setHasUiShell","useState","useEffect","Boolean","document","querySelector"],"sources":["../../../src/ui-shell/useHasUiShell.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-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 { useEffect, useState } from \"react\";\n\nexport const uiShellDataAttribute = \"data-unified-ui-shell\";\n\nexport const useHasUiShell = () => {\n  const [hasUiShell, setHasUiShell] = useState(false);\n\n  useEffect(() => {\n    setHasUiShell(Boolean(document.querySelector(`[${uiShellDataAttribute}]`)));\n  }, []);\n\n  return hasUiShell;\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMC,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG,uBAAuB;AAEpD,MAAME,aAAa,GAAGA,CAAA,KAAM;EACjC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAEnD,IAAAC,gBAAS,EAAC,MAAM;IACdF,aAAa,CAACG,OAAO,CAACC,QAAQ,CAACC,aAAa,CAAC,IAAIT,oBAAoB,GAAG,CAAC,CAAC,CAAC;EAC7E,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOG,UAAU;AACnB,CAAC;AAACF,OAAA,CAAAC,aAAA,GAAAA,aAAA","ignoreList":[]}