{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAMM,SAAS,0CAAY,KAAa,EAAE,GAAkC;IAC3E,IAAI,CAAC,UAAU,YAAY,GAAG,CAAA,GAAA,qBAAO,EAAE;IACvC,CAAA,GAAA,2DAAc,EAAE;QACd,YAAY,CAAC,CAAE,CAAA,IAAI,OAAO,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC,MAAK;IAC/D,GAAG;QAAC;QAAa;QAAO;KAAI;IAC5B,OAAO;AACT","sources":["packages/@adobe/react-spectrum/src/utils/useHasChild.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject} from '@react-types/shared';\nimport {useLayoutEffect} from 'react-aria/private/utils/useLayoutEffect';\nimport {useState} from 'react';\n\nexport function useHasChild(query: string, ref: RefObject<HTMLElement | null>): boolean {\n  let [hasChild, setHasChild] = useState(true);\n  useLayoutEffect(() => {\n    setHasChild(!!(ref.current && ref.current.querySelector(query)));\n  }, [setHasChild, query, ref]);\n  return hasChild;\n}\n"],"names":[],"version":3,"file":"useHasChild.cjs.map"}