import{d as h,E as b,c as v,w as g,c2 as w,o as l,p as r,c3 as x,c4 as y,l as k,e as p,q as $,c5 as V,b as M,a as C,t as B,f as m,i as N,n as f}from"./BvNnk7SS.js";import{a as T,u as D}from"./3x3eqdRC.js";import{_ as E}from"./CuzaDH-7.js";const H=h({__name:"NDarkToggle",setup(c){const s=T({storageKey:"nuxt-devtools-color-mode"}),t=b({get(){return s.value==="dark"},set(){s.value=t.value?"light":"dark"}}),d=typeof document<"u"&&document.startViewTransition&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches;function i(a){if(!d||!a){t.value=!t.value;return}const n=a.clientX,o=a.clientY,_=Math.hypot(Math.max(n,innerWidth-n),Math.max(o,innerHeight-o));document.startViewTransition(async()=>{t.value=!t.value,await k()}).ready.then(()=>{const u=[`circle(0px at ${n}px ${o}px)`,`circle(${_}px at ${n}px ${o}px)`];document.documentElement.animate({clipPath:t.value?[...u].reverse():u},{duration:400,easing:"ease-in",pseudoElement:t.value?"::view-transition-old(root)":"::view-transition-new(root)"})})}const e={mode:s,isDark:t,toggle:i};return(a,n)=>{const o=w;return l(),v(o,{"placeholder-tag":"span"},{default:g(()=>[r(a.$slots,"default",x(y(e)))]),_:3})}}}),P=["disabled"],S={key:0,value:"",disabled:"",hidden:""},I=h({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(c,{emit:s}){const i=D(c,"modelValue",s,{passive:!0});return(e,a)=>{const n=E;return l(),p("div",{class:f(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[r(e.$slots,"icon",{},()=>[e.icon?(l(),v(n,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):m("",!0)]),$(C("select",{"onUpdate:modelValue":a[0]||(a[0]=o=>N(i)?i.value=o:null),disabled:e.disabled,class:f(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(l(),p("option",S,B(e.placeholder),1)):m("",!0),r(e.$slots,"default")],10,P),[[V,M(i)]])],2)}}});export{H as _,I as a};
