{"version":3,"file":"use-placeholder.mjs","sources":["../../../../../../../packages/components/nav-bar/src/use-placeholder.tsx"],"sourcesContent":["import { useHeight } from '@xzx-design/hooks'\n\nimport type { BEM } from '@xzx-design/hooks'\nimport type { Ref } from 'vue'\n\nexport function usePlaceholder(contentRef: Ref<Element | undefined>, bem: BEM) {\n  const height = useHeight(contentRef, true)\n\n  return (renderContent: () => JSX.Element) => (\n    <div\n      class={bem('placeholder')}\n      style={{ height: height.value ? `${height.value}px` : undefined }}\n    >\n      {renderContent()}\n    </div>\n  )\n}\n"],"names":["usePlaceholder","contentRef","bem","height","useHeight","renderContent","_createVNode","value","undefined"],"mappings":";;;;AAKgBA,SAAAA,cAAAA,CAAeC,YAAsCC,GAAU,EAAA;AAC7E,EAAMC,MAAAA,MAAAA,GAASC,SAAUH,CAAAA,UAAAA,EAAY,IAAI,CAAA,CAAA;AAEzC,EAAQI,OAAAA,CAAAA,aAAAA,KAAgCC,YAAA,KAAA,EAAA;AAAA,IAAA,OAAA,EAE7BJ,IAAI,aAAa,CAAA;AAAA,IAAC,OAClB,EAAA;AAAA,MAAEC,MAAQA,EAAAA,MAAAA,CAAOI,KAAQ,GAAA,CAAA,EAAGJ,OAAOI,KAAYC,CAAAA,EAAAA,CAAAA,GAAAA,KAAAA,CAAAA;AAAAA,KAAU;AAAA,GAE/DH,EAAAA,CAAAA,aAAc,EAAC,CAEnB,CAAA,CAAA;AACH;;;;"}