1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{f as t,o as n,s as r,t as i}from"./jsx-runtime-Z_pwUkLG.js";import{n as a,t as o}from"./index-CSKVfgds.js";var s=e(t(),1),c=i();function l({variant:e=`dropdown`,showLabel:t=!0,className:i=``}){let{activeLocation:l,switchToLocation:u,locationData:d}=a(),[f,p]=(0,s.useState)(!1),m=r();n().pathname;let h=Object.values(o),g=e=>{u(e),p(!1),m(e===`lake-havasu`?`/lake-havasu`:`/locations?section=${e}`)};return e===`pill`?(0,c.jsx)(`div`,{className:`flex items-center gap-1 bg-white/20 rounded-full p-1 ${i}`,children:h.map(e=>(0,c.jsx)(`button`,{onClick:()=>g(e.key),className:`px-3 py-1.5 rounded-full text-xs font-black transition-all cursor-pointer whitespace-nowrap ${l===e.key?`bg-[#FFC820] text-[#007FFF] shadow-sm`:`text-white/80 hover:text-white hover:bg-white/10`}`,children:e.name},e.key))}):e===`admin`?(0,c.jsxs)(`div`,{className:`relative ${i}`,children:[(0,c.jsxs)(`button`,{onClick:()=>p(!f),className:`flex items-center gap-2 bg-white border border-gray-200 rounded-lg px-3 py-2 text-sm font-bold text-gray-700 hover:bg-gray-50 transition-all cursor-pointer whitespace-nowrap`,children:[(0,c.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full flex-shrink-0`,style:{backgroundColor:d.color}}),d.fullName,(0,c.jsx)(`i`,{className:`ri-arrow-down-s-line transition-transform ${f?`rotate-180`:``}`})]}),f&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:()=>p(!1)}),(0,c.jsx)(`div`,{className:`absolute top-full left-0 mt-1 w-56 bg-white rounded-xl shadow-xl border border-gray-200 z-50 py-1`,children:h.map(e=>(0,c.jsxs)(`button`,{onClick:()=>g(e.key),className:`w-full flex items-center gap-2 px-3 py-2 text-sm font-bold transition-colors cursor-pointer ${l===e.key?`bg-[#007FFF]/10 text-[#007FFF]`:`text-gray-700 hover:bg-gray-50`}`,children:[(0,c.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full flex-shrink-0`,style:{backgroundColor:e.color}}),e.fullName,l===e.key&&(0,c.jsx)(`i`,{className:`ri-check-line ml-auto text-[#007FFF]`})]},e.key))})]})]}):(0,c.jsxs)(`div`,{className:`relative ${i}`,children:[(0,c.jsxs)(`button`,{onClick:()=>
1p(!f),className:`flex items-center gap-2 bg-white/15 hover:bg-white/25 text-white font-bold text-sm px-3 py-2 rounded-lg transition-all cursor-pointer whitespace-nowrap`,children:[t&&(0,c.jsx)(`span`,{className:`hidden lg:inline`,children:`Location:`}),(0,c.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full flex-shrink-0`,style:{backgroundColor:d.color}}),(0,c.jsx)(`span`,{children:d.name}),(0,c.jsx)(`i`,{className:`ri-arrow-down-s-line transition-transform ${f?`rotate-180`:``}`})]}),f&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:()=>p(!1)}),(0,c.jsx)(`div`,{className:`absolute top-full right-0 mt-1 w-52 bg-white rounded-xl shadow-xl border-t-4 border-[#FFC820] z-50 py-2`,children:h.map(e=>(0,c.jsxs)(`button`,{onClick:()=>g(e.key),className:`w-full flex items-center gap-3 px-4 py-3 text-sm font-bold transition-colors cursor-pointer ${l===e.key?`bg-[#007FFF]/10 text-[#007FFF]`:`text-gray-700 hover:bg-gray-50`}`,children:[(0,c.jsx)(`span`,{className:`w-3 h-3 rounded-full flex-shrink-0`,style:{backgroundColor:e.color}}),e.name,`, `,e.state,l===e.key&&(0,c.jsx)(`i`,{className:`ri-check-line ml-auto text-[#007FFF]`})]},e.key))})]})]})}export{l as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.