import{n as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{n}from"./iframe-GrlyTB2d.js";import{a as r,i}from"./utils-DUM89eIj.js";import{n as a,t as o}from"./ui.module-CiLQZm_L.js";import{a as s,d as c,f as l}from"./usePickerTriggerController-DlzLjIYg.js";function u({emptyState:e,errorState:t}){let n=t??e;return n==null?null:(0,d.jsx)(`div`,{className:r(a.uiPopupOption,c.status,t!==void 0&&c.statusError),"aria-disabled":!0,children:n})}var d;function f(){return(f=e((()=>{i(),o(),l(),d=n(),u.__docgenInfo={description:``,methods:[],displayName:`PickerStatus`,props:{emptyState:{required:!1,tsType:{name:`ReactNode`},description:``},errorState:{required:!1,tsType:{name:`ReactNode`},description:``}}}})))()}function p({query:e,defaultQuery:t,onQuery:n,resetOnClose:r,triggerMode:i}){let a=e!==void 0,[o,c]=(0,m.useState)(t??``),l=a?e??``:o,u=r??(!i||s(i).resetQueryOnClose),d=e=>{a||c(e),n?.(e)};return{query:l,setQuery:d,clearQuery:()=>d(``),resetQueryOnClose:u}}var m;function h(){return(h=e((()=>{m=t()})))()}export{f as i,p as n,u as r,h as t};