
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.github.io
 */

import{d as b,as as m,at as f,n as g,p as v,g as a,z as h,w as r,e as t,c as i,s as _,F as k,t as c,i as w,b as x,ai as y,j as V,Q as C}from"./index-nGFMSQGw.js";const B={class:"w-full inline-flex"},M=["disabled"],z={class:"block truncate"},S={class:"pointer-events-none absolute end-0 inset-y-0 flex items-center pe-2.5"},$={class:"max-h-60 w-full scroll-py-1 overflow-y-auto p-1 lg-w-48 focus-outline-none"},F=["disabled","onClick"],E=b({__name:"HSelect",props:m({options:{},disabled:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const l=o,n=f(o,"modelValue"),d=g({get(){return l.options.find(e=>e.value===n.value)??l.options[0]},set(e){n.value=e.value}});return(e,N)=>{const u=V,p=v("VMenu");return a(),h(p,y({triggers:["click"],"popper-triggers":["click"],delay:0,disabled:e.disabled},e.$attrs),{popper:r(()=>[t("div",$,[(a(!0),i(k,null,_(e.options,s=>(a(),i("button",{key:s.value,disabled:s.disabled,class:C(["w-full cursor-pointer truncate border-size-0 rounded-md bg-inherit px-2 py-1.5 text-left text-sm disabled-cursor-not-allowed hover-not-disabled-bg-stone-1 dark-hover-not-disabled-bg-stone-9",{"font-bold":o.modelValue===s.value}]),onClick:j=>d.value=s},c(s.label),11,F))),128))])]),default:r(()=>[t("div",B,[t("button",{class:"relative block w-full flex cursor-default items-center gap-x-2 border-0 rounded-md bg-white px-2.5 py-1.5 pe-9 text-left text-sm shadow-sm ring-1 ring-stone-2 ring-inset lg-w-48 disabled-cursor-not-allowed dark-bg-dark focus-outline-none focus-ring-2 dark-ring-stone-8 focus-ring-ui-primary",disabled:e.disabled},[t("span",z,c(w(d).label),1),t("span",S,[x(u,{name:"i-carbon:chevron-down",class:"h-5 w-5 flex-shrink-0 text-stone-5"})])],8,M)])]),_:1},16,["disabled"])}}});export{E as default};
