var x=Object.defineProperty;var n=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var g=(e,t,a)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,d=(e,t)=>{for(var a in t||(t={}))u.call(t,a)&&g(e,a,t[a]);if(n)for(var a of n(t))c.call(t,a)&&g(e,a,t[a]);return e};var b=(e,t)=>{var a={};for(var i in e)u.call(e,i)&&t.indexOf(i)<0&&(a[i]=e[i]);if(e!=null&&n)for(var i of n(e))t.indexOf(i)<0&&c.call(e,i)&&(a[i]=e[i]);return a};var f=(e,t,a)=>new Promise((i,s)=>{var _=r=>{try{l(a.next(r))}catch(p){s(p)}},C=r=>{try{l(a.throw(r))}catch(p){s(p)}},l=r=>r.done?i(r.value):Promise.resolve(r.value).then(_,C);l((a=a.apply(e,t)).next())});import{u as h}from"./useQuery-tXf2Qa8J.js";import{b as w}from"./settings-services-C1WB00Jx.js";import{z as o}from"./utils-CbOYy0fT.js";import{j as y}from"./radixui-DBNNXUn7.js";import{r as v}from"./router-ZPDjRWWZ.js";import{c as j}from"./index-C1-9bQes.js";const z=()=>{const{isPending:e,data:t,isError:a,error:i}=h({queryKey:["getClients"],queryFn:()=>f(null,null,function*(){const s=yield w();if(s.status==200)return s.data.clients;throw new Error("Error fetching")})});return{isPending:e,clients:t,isError:a,error:i}},m=o.instanceof(File).refine(e=>e.type.startsWith("image/"),{message:"Debe ser un archivo de imagen"}),D=o.object({username:o.string().toLowerCase().min(2,{message:"Campo requerido"}),email:o.string().optional(),password:o.string().optional(),contact_number:o.string().optional(),commission_percent:o.string().optional(),trm_discount:o.string().optional(),observation:o.string().optional(),status:o.boolean().default(!1).optional(),assigned_specialist_id:o.number({message:"Campo obligatorio"}),client_id:o.number({message:"Campo obligatorio"}),payment_method_id:o.number({message:"Campo obligatorio"}),regional_id:o.number({message:"Campo obligatorio"}),doc1:m.optional().nullable(),doc2:m.optional().nullable()}),G=o.object({id:o.number(),username:o.string().toLowerCase().min(2,{message:"Campo requerido"}),email:o.string().optional(),password:o.string().optional(),contact_number:o.string().optional(),commission_percent:o.string().optional(),trm_discount:o.string().optional(),observation:o.string().optional(),status:o.boolean().default(!1).optional(),assigned_specialist_id:o.number({message:"Campo obligatorio"}),client_id:o.number({message:"Campo obligatorio"}),payment_method_id:o.number({message:"Campo obligatorio"}),regional_id:o.number({message:"Campo obligatorio"}),doc1:m.optional().nullable(),doc2:m.optional().nullable()}),E=v.forwardRef((i,a)=>{var s=i,{className:e}=s,t=b(s,["className"]);return y.jsx("textarea",d({className:j("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a},t))});E.displayName="Textarea";export{E as T,G as a,D as f,z as u};
