1import{_ as B}from"./lByDAgIx.js";import{_ as $}from"./DeNuUzok.js";import{_ as I,o as i,c as u,a,F as j,j as R,d as b,s as y,B as _,t as w,O as U,a0 as A,n as E,l as d,H as O,aq as V}from"./BkE15QU6.js";const z={},M={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function q(e,t){return i(),u("svg",M,[...t[0]||(t[0]=[a("path",{d:"M5.40999 21.75C4.28999 21.75 3.57999 21.37 3.12999 20.92C2.24999 20.04 1.62999 18.17 3.60999 14.2L4.47999 12.47C4.58999 12.24 4.58999 11.76 4.47999 11.53L3.60999 9.80002C1.61999 5.83002 2.24999 3.95002 3.12999 3.08002C3.99999 2.20002 5.87999 1.57002 9.83999 3.56002L18.4 7.84002C20.53 8.90002 21.7 10.38 21.7 12C21.7 13.62 20.53 15.1 18.41 16.16L9.84999 20.44C7.90999 21.41 6.46999 21.75 5.40999 21.75ZM5.40999 3.75002C4.86999 3.75002 4.44999 3.88002 4.18999 4.14002C3.45999 4.86002 3.74999 6.73002 4.94999 9.12002L5.81999 10.86C6.13999 11.51 6.13999 12.49 5.81999 13.14L4.94999 14.87C3.74999 17.27 3.45999 19.13 4.18999 19.85C4.90999 20.58 6.77999 20.29 9.17999 19.09L17.74 14.81C19.31 14.03 20.2 13 20.2 11.99C20.2 10.98 19.3 9.95002 17.73 9.17002L9.16999 4.90002C7.64999 4.14002 6.33999 3.75002 5.40999 3.75002Z",fill:"#292D32"},null,-1),a("path",{d:"M10.84 12.75H5.44C5.03 12.75 4.69 12.41 4.69 12C4.69 11.59 5.03 11.25 5.44 11.25H10.84C11.25 11.25 11.59 11.59 11.59 12C11.59 12.41 11.25 12.75 10.84 12.75Z",fill:"#292D32"},null,-1)])])}const H=Object.assign(I(z,[["render",q]]),{__name:"IconsSend"}),N=A({inheritAttrs:!1,props:{class:String,style:[String,Object],name:{type:String,required:!0},modelValue:{default:"",type:[String,Number]},required:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},autocomplete:{type:String,default:null},error:{type:String},invalid:{type:Boolean,default:!1},autoResize:{type:Boolean,default:!1}},emits:["update:modelValue","submit"],setup(e,{emit:t}){const n=d(null),l=d([]),s=d([]),p=d(null),f=d(!1),c=E(),g=d(`comment-img-${Math.random().toString(36).substring(7)}`),o=3,m=()=>{e.autoResize&&n.value&&(n.value.style.height="auto",n.value.style.height=`${n.value.scrollHeight}px`)};function C(r){t("update:modelValue",r.target.value),m()}function S(r){const k=Array.from(r.target.files);p.value=null,k.forEach(v=>{if(!v.type.startsWith("image/")){p.value="Only image files are allowed.",c.error("Only image files are allowed.");return}l.value.length<o?(l.value.push(v),s.value.push(URL.createObjectURL(v))):c.error(`Maximum of ${o} images allowed`)}),r.target.value=""}function L(r){URL.revokeObjectURL(s.value[r]),s.value.splice(r,1),l.value.splice(r,1)}function h(){s.value.forEach(r=>URL.revokeObjectURL(r)),s.value=[],l.value=[]}function x(){e.disabled||(t("submit",l.value),h())}return O(()=>e.modelValue,()=>{e.modelValue===""&&n.value&&(n.value.style.height="auto")}),V(()=>{h()}),{onInput:C,handleSubmit:x,onImageChange:S,removeImage:L,clearImages:h,imageFiles:l,previewUrls:s,validationError:p,isProcessing:f,textareaRef:n,inputId:g}}}),D={key:0,class:"flex gap-2 flex-wrap ml-2"},F=["src"],P=["onClick"],Z={class:"relative flex gap-2 items-center w-full"},G={type:"button"},T=["name","id"],W=["for"],X=["id","value","required","placeholder","autocomplete"],J=["disabled"],K={key:1,class:"text-[#CB1A14] text-xs px-2"},Q={key:2,class:"text-[#CB1A14] text-xs px-2"};function Y(e,t,n,l,s,p){const f=B,c=$,g=H;return i(),u("div",{style:U(e.style),class:_(["relative flex flex-col gap-2",e.$props.class])},[e.previewUrls.length?(i(),u("div",D,[(i(!0),u(j,null,R(e.previewUrls,(o,m)=>(i(),u("div",{key:m,class:"relative w-16 h-16 group"},[a("img",{src:o,class:"w-full h-full object-cover rounded-xl border-2 border-primary/20 shadow-sm",alt:"Preview"},null,8,F),a("button",{onClick:C=>e.removeImage(m),class:"absolute -top-2 -right-2 bg-white rounded-full p-1 shadow-md hover:bg-gray-100 transition-colors border border-divider",type:"button"},[b(f,{class:"w-4 h-4 text-tx_secondary"})],8,P)]))),128))])):y("",!0),a("div",Z,[a("button",G,[a("input",{type:"file",class:"hidden",name:e.inputId,id:e.inputId,accept:"image/*",multiple:"",onChange:t[0]||(t[0]=(...o)=>e.onImageChange&&e.onImageChange(...o))},null,40,T),a("label",{class:"w-12 h-12 rounded-full border border-gray-200 flex items-center justify-center text-gray-500 hover:bg-primary/5 hover:text-primary hover:border-primary/30 transition-all cursor-pointer flex-shrink-0",for:e.inputId},[b(c)],8,W)]),a("textarea",{ref:"textareaRef",id:e.name,value:e.modelValue,onInput:t[1]||(t[1]=(...o)=>e.onInput&&e.onInput(...o)),required:e.required,placeholder:e.placeholder,autocomplete:e.autocomplete,class:_(["block w-full px-3 py-3 pr-[50px] placeholder-[#A1A1B2] border border-[#C3C5C9] rounded-2xl appearance-none focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary text-sm transition-all resize-none",[e.invali
1d&&"border-[#E26E6A]",e.autoResize?" h-auto resize-none overflow-hidden":"h-[48px] overflow-auto custom-scroll"]])},null,42,X),a("button",{disabled:e.disabled||e.isProcessing,onClick:t[2]||(t[2]=(...o)=>e.handleSubmit&&e.handleSubmit(...o)),class:"absolute right-2 top-1 h-10 w-10 rounded-full border border-divider bg-white flex items-center justify-center hover:bg-primary hover:text-white disabled:bg-gray-50 disabled:text-gray-300 disabled:border-transparent transition-all group shadow-sm"},[b(g,{class:"w-5 h-5 group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-transform"})],8,J)]),e.error?.length?(i(),u("span",K,w(e.error),1)):y("",!0),e.validationError?(i(),u("span",Q,w(e.validationError),1)):y("",!0)],6)}const re=Object.assign(I(N,[["render",Y]]),{__name:"UiCommentInput"});export{H as _,re as a};
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.