var x=Object.defineProperty;var n=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;var g=(o,t,a)=>t in o?x(o,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[t]=a,d=(o,t)=>{for(var a in t||(t={}))u.call(t,a)&&g(o,a,t[a]);if(n)for(var a of n(t))c.call(t,a)&&g(o,a,t[a]);return o};var b=(o,t)=>{var a={};for(var i in o)u.call(o,i)&&t.indexOf(i)<0&&(a[i]=o[i]);if(o!=null&&n)for(var i of n(o))t.indexOf(i)<0&&c.call(o,i)&&(a[i]=o[i]);return a};var f=(o,t,a)=>new Promise((i,s)=>{var _=r=>{try{m(a.next(r))}catch(p){s(p)}},C=r=>{try{m(a.throw(r))}catch(p){s(p)}},m=r=>r.done?i(r.value):Promise.resolve(r.value).then(_,C);m((a=a.apply(o,t)).next())});import{u as h}from"./useQuery-DGaD2i6Y.js";import{b as w}from"./settings-services-CMNk-eHJ.js";import{z as e}from"./form-DuLR_XsI.js";import{r as y,j as v,c as j}from"./index-C7Y5J1TO.js";const N=()=>{const{isPending:o,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:o,clients:t,isError:a,error:i}},l=e.instanceof(File).refine(o=>o.type.startsWith("image/"),{message:"Debe ser un archivo de imagen"}),R=e.object({username:e.string().toLowerCase().min(2,{message:"Campo requerido"}),email:e.string().optional(),password:e.string().optional(),contact_number:e.string().optional(),commission_percent:e.string().optional(),trm_discount:e.string().optional(),observation:e.string().optional(),status:e.boolean().default(!1).optional(),assigned_specialist_id:e.number({message:"Campo obligatorio"}),client_id:e.number({message:"Campo obligatorio"}),payment_method_id:e.number({message:"Campo obligatorio"}),regional_id:e.number({message:"Campo obligatorio"}),doc1:l.optional().nullable(),doc2:l.optional().nullable()}),z=e.object({id:e.number(),username:e.string().toLowerCase().min(2,{message:"Campo requerido"}),email:e.string().optional(),password:e.string().optional(),contact_number:e.string().optional(),commission_percent:e.string().optional(),trm_discount:e.string().optional(),observation:e.string().optional(),status:e.boolean().default(!1).optional(),assigned_specialist_id:e.number({message:"Campo obligatorio"}),client_id:e.number({message:"Campo obligatorio"}),payment_method_id:e.number({message:"Campo obligatorio"}),regional_id:e.number({message:"Campo obligatorio"}),doc1:l.optional().nullable(),doc2:l.optional().nullable()}),E=y.forwardRef((i,a)=>{var s=i,{className:o}=s,t=b(s,["className"]);return v.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",o),ref:a},t))});E.displayName="Textarea";export{E as T,z as a,R as f,N as u};
