File: /home/dnlightw-124/dn.lightweb.kr/public/build/assets/DepartmentSwitcher-DtOIFioT.js
import{r as h,y as c,z as u,H as a,I as s,A as t,E as r,N as l,C as f,Z as p,F as x,B as b}from"./runtime-dom.esm-bundler-COsyWSZ4.js";import"./index.esm2017-BwYSbQyX.js";import{j as v,A as w,F as g,I as k}from"./listbox-CFjojfpG.js";import"./keyboard-PKtydfbd.js";const y={class:"min-w-28 flex justify-end"},_={class:"relative"},A={class:"text-center select-none py-1 cursor-pointer"},B=["href"],D={__name:"DepartmentSwitcher",props:{isMotion:Boolean},setup(o){const d=[{label:"피부과",href:"https://udn.lightweb.kr"},{label:"비뇨기과",href:"https://dn.lightweb.kr"}],i=h(d[1]);return(C,n)=>(u(),c("div",y,[a(r(k),{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=e=>i.value=e)},{default:s(()=>[t("div",_,[a(r(v),{class:l(["relative w-fit cursor-pointer rounded-full py-2 pl-5 pr-9 text-white text-center focus:outline-none",o.isMotion?"bg-black/15":"border border-black-800"])},{default:s(({open:e})=>[t("span",{class:l(["block truncate text-sm md:text-base",o.isMotion?"text-white":"text-black-800"])},f(i.value.label),3),t("span",{class:l(["pointer-events-none absolute inset-y-0 right-1 flex items-center pr-3.5",o.isMotion?"text-white":"text-black-800"])},[(u(),c("svg",{"aria-hidden":"true",width:"9",height:"5",viewBox:"0 0 9 5",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",class:l([e?"rotate-180 transition-transform duration-300 ease-in-out":"transition-transform duration-300 ease-in-out",o.isMotion?"text-red":"text-black-800"])},n[1]||(n[1]=[t("path",{d:"M3.95 4.683.158.89A.493.493 0 0 1 0 .524C0 .383.048.261.144.156A.49.49 0 0 1 .524 0h7.953a.49.49 0 0 1 .38.157A.525.525 0 0 1 9 .523c0 .035-.052.157-.157.367L5.05 4.683a.797.797 0 0 1-.262.184.768.768 0 0 1-.288.052.768.768 0 0 1-.288-.052.797.797 0 0 1-.261-.184z",fill:"currentColor"},null,-1)]),2))],2)]),_:1},8,["class"]),a(p,{"leave-active-class":"transition duration-100 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:s(()=>[a(r(w),{class:"absolute mt-2 max-h-60 w-full px-2.5 py-4 overflow-auto rounded-lg bg-white text-sm md:text-base shadow-lg ring-1 ring-black/5 focus:outline-none sm:text-sm"},{default:s(()=>[(u(),c(x,null,b(d,e=>a(r(g),{key:e,value:e,as:"template"},{default:s(({active:M,selected:m})=>[t("li",A,[t("a",{href:e.href,class:"block"},[t("span",{class:l([m?"font-medium text-black-800 ":"font-normal text-footer-gray","block truncate"])},f(e.label),3)],8,B)])]),_:2},1032,["value"])),64))]),_:1})]),_:1})])]),_:1},8,["modelValue"])]))}};export{D as default};