import{r as x,j as i}from"./app-BwDemWQz.js";import{u as g,S as c,e as b}from"./countries-DKyaIPud.js";const f=(t,r,a,l=!1)=>t.map(o=>{const s=String(o[r]),d=l?`+${o[a]}`:o[a];return{value:s,label:d}});var m=x.forwardRef(function(t,r){var a=g(t);return x.createElement(c,b({ref:r},a))}),p=m;function S({options:t,value:r,onChange:a,placeholder:l="Select...",isMulti:o=!1,maxMenuHeight:s=300,className:d="",...u}){return i.jsx("div",{className:"relative",children:i.jsx(p,{options:t,isMulti:o,value:o?t.filter(e=>r==null?void 0:r.includes(e.value)):t.find(e=>e.value===r)||null,onChange:e=>{a(o?e?e.map(n=>n.value):[]:e?e.value:null)},placeholder:l,isSearchable:!0,isClearable:!0,maxMenuHeight:s,menuPosition:"fixed",menuPlacement:"auto",menuShouldScrollIntoView:!1,menuPortalTarget:document.body,className:`w-full text-bodyTextSecondary ${d}`,styles:{menuPortal:e=>({...e,zIndex:99999,position:"fixed"}),menu:e=>({...e,zIndex:99999,position:"absolute"}),control:(e,n)=>({...e,minHeight:"42px",border:n.isFocused?"1px solid rgb(59 130 246)":"1px solid rgb(209 213 219)",boxShadow:n.isFocused?"0 0 0 3px rgba(59, 130, 246, 0.1)":"none","&:hover":{border:n.isFocused?"1px solid rgb(59 130 246)":"1px solid rgb(156 163 175)"}})},classNames:{control:({isFocused:e})=>"flex min-h-[42px] rounded-lg shadow-sm text-sm transition bg-white dark:bg-zinc-900",valueContainer:()=>"px-3 py-1",placeholder:()=>"text-gray-500 dark:text-gray-400",singleValue:()=>"text-gray-900 dark:text-gray-100",indicatorsContainer:()=>"px-2 gap-1",dropdownIndicator:({isFocused:e})=>`transition ${e?"text-blue-500":"text-gray-400"} hover:text-blue-500`,clearIndicator:()=>"text-gray-400 hover:text-red-500 transition cursor-pointer",menu:()=>"mt-1 rounded-lg shadow-2xl border border-gray-200 dark:border-gray-600 bg-white dark:bg-zinc-900",menuList:()=>"p-1 max-h-64 overflow-y-auto scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600 scrollbar-track-transparent",option:({isFocused:e,isSelected:n})=>`px-3 py-2 text-sm cursor-pointer transition-colors rounded-md mx-1 
             ${n?"bg-blue-500 text-white":e?"bg-blue-50 dark:bg-gray-700 text-gray-900 dark:text-gray-100":"text-gray-900 dark:text-gray-100"}`,multiValue:()=>"bg-blue-100 dark:bg-gray-700 rounded-md flex items-center mx-0.5",multiValueLabel:()=>"text-blue-800 dark:text-gray-100 text-sm px-1",multiValueRemove:()=>"text-blue-600 hover:text-red-500 cursor-pointer px-1",noOptionsMessage:()=>"text-gray-500 dark:text-gray-400 px-3 py-2 text-sm",loadingMessage:()=>"text-gray-500 dark:text-gray-400 px-3 py-2 text-sm"},...u})})}export{S as R,f as t};
