1import{bd as m,r as a,j as e,b8 as h,b9 as f,be as g,bb as j,bf as b,bg as w,bc as y}from"./index-Cz3wH2jj.js";function v({variant:c="header",className:i="",onAfterSelect:n}){const{country:s,countries:l,setCountry:d}=m(),o=c==="footer",[x,u]=a.useState(!1),t=a.useRef(null);return a.useEffect(()=>()=>{t.current&&clearTimeout(t.current)},[]),e.jsxs(h,{open:x,onOpenChange:u,children:[e.jsxs(f,{"data-no-translate":!0,"aria-label":`Change country â currently ${s.name}`,className:`flex items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-colors ${o?"border border-white/20 text-white/80 hover:text-white":"text-foreground/70 hover:text-primary"} ${i}`,children:[e.jsx(g,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),e.jsx("span",{children:s.flag}),e.jsx("span",{className:"truncate",children:s.name}),e.jsx("span",{className:"text-xs opacity-70",children:s.currency})]}),e.jsxs(j,{"data-no-translate":!0,align:o?"start":"end",className:"w-[min(16rem,calc(100vw-2rem))] max-h-[60vh] overflow-y-auto bg-popover z-[60]",children:[e.jsx(b,{children:"Choose your country"}),e.jsx(w,{}),l.map(r=>e.jsxs(y,{onSelect:p=>{p.preventDefault(),u(!1),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{d(r.code),n==null||n()},180)},className:"flex items-center gap-2",children:[e.jsx("span",{"aria-hidden":"true",children:r.flag}),e.jsx("span",{className:"flex-1",children:r.name}),e.jsx("span",{className:"text-xs text-muted-foreground",children:r.currency}),r.status!=="live"&&e.jsx("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:r.status})]},r.code))]})]})}export{v as C};
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.