import{q as h,r as m,b as w,y as s,S as g,U as n,I as a,z as o,L as v,a9 as c,A as y,C as f,J as b,K as k,D as r}from"./EchoChannel-Bg1-kez_.js";import{_ as L}from"./_plugin-vue_export-helper-DlAUqK2U.js";const M={class:"flex flex-col"},q={key:0,class:"uppercase text-qorus-grey-dark tracking-widest text-xs mb-2 flex group relative"},x={key:0,class:"no-underline",title:"required"},_={key:1,class:"pl-2 normal-case text-sm font-light block"},Z={class:"hidden group-hover:block bg-white p-4 absolute top-4 left-4 right-4 max-w-sm border-qorus-grey-light border z-10"},B=["innerHTML"],H={class:"relative"},V=["maxlength","type","placeholder"],F={key:0,width:"25",height:"25",viewBox:"0 0 25 25",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},I={key:1,width:"25",height:"25",viewBox:"0 0 25 18",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},D={key:1,class:"text-qorus-grey-mid text-sm absolute bottom-2 right-2"},P={key:1,class:"mt-2 text-qorus-grey-mid font-thin text-sm"},T={class:"flex flex-col gap-2 mt-2"},z={class:"text-qorus-red"},N=h({__name:"FormInput",props:{focus:{type:Boolean},label:{},placeholder:{},value:{},required:{type:Boolean},errors:{},type:{},wordCount:{},help:{},tooltip:{}},emits:["change"],setup(p,{emit:$}){const d=p,l=m({hidePassword:!0,value:d.value}),u=w(()=>d.type==="password"&&!l.hidePassword?"text":d.type),C={mounted:(e,t)=>{t.value&&e.focus()}};return(e,t)=>(r(),s("div",M,[e.label?(r(),s("label",q,[g(n(e.label)+" ",1),e.required?(r(),s("abbr",x,"*")):a("",!0),e.tooltip?(r(),s("span",_,[t[3]||(t[3]=o("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[o("path",{d:"M6.5015 13C2.91684 13 0 10.0862 0 6.5015C0 2.91684 2.91684 0 6.5015 0C10.0862 0 13.003 2.91684 13.003 6.5015C13.003 10.0862 10.0862 13.003 6.5015 13.003V13ZM6.5015 1.19788C3.57867 1.19788 1.19788 3.57567 1.19788 6.5015C1.19788 9.42732 3.57567 11.8051 6.5015 11.8051C9.42732 11.8051 11.8051 9.42732 11.8051 6.5015C11.8051 3.57567 9.42433 1.19788 6.5015 1.19788Z"}),o("path",{d:"M6.67217 8.01087H5.6929L5.60006 6.69021C6.3158 6.30689 7.23817 5.86667 7.23817 5.15992C7.23817 4.52504 6.72308 4.31841 6.14211 4.31841C5.60006 4.31841 4.98615 4.51606 4.68668 4.70173L4.47705 3.68054C4.99513 3.39005 5.61803 3.22534 6.27986 3.22534C7.44181 3.22534 8.52589 3.74342 8.52589 5.03714C8.52589 5.98346 7.89999 6.54048 6.77998 7.11546L6.67217 8.00788V8.01087ZM6.18703 8.3942C6.57933 8.3942 6.88479 8.69966 6.88479 9.08298C6.88479 9.4663 6.57933 9.77176 6.18703 9.77176C5.79472 9.77176 5.49525 9.47229 5.49525 9.08298C5.49525 8.69367 5.79472 8.3942 6.18703 8.3942Z"})],-1)),o("span",Z,[o("span",{innerHTML:e.tooltip,class:"text-qorus-grey-dark"},null,8,B)])])):a("",!0)])):a("",!0),o("div",H,[v(o("input",{maxlength:e.wordCount||null,class:y(["w-full border border-qorus-grey-light border-solid py-2 px-4 outline-2 focus:outline focus:outline-qorus-purple",{"outline outline-qorus-red":e.errors.length,"pr-20":e.wordCount}]),type:u.value,placeholder:e.placeholder,autocomplete:"new-password","onUpdate:modelValue":t[0]||(t[0]=i=>l.value=i),onInput:t[1]||(t[1]=i=>e.$emit("change",l.value))},null,42,V),[[C,e.focus||!1],[c,l.value]]),e.type==="password"?(r(),s("div",{key:0,class:"cursor-pointer h-6 w-8 text-qorus-grey-mid hover:text-qorus-purple absolute bottom-2 right-2",onClick:t[2]||(t[2]=f(i=>l.hidePassword=!l.hidePassword,["prevent"]))},[u.value==="password"?(r(),s("svg",F,t[4]||(t[4]=[o("path",{d:"M10.6533 10.6037C11.4597 9.52856 12.9991 9.30864 14.0742 10.115C15.1493 10.9213 15.3693 12.4607 14.5629 13.5359"},null,-1),o("path",{d:"M10.6533 10.6037C11.4597 9.52856 12.9991 9.30864 14.0742 10.115C15.1493 10.9213 15.3693 12.4607 14.5629 13.5359"},null,-1),o("path",{d:"M12.2175 20.4154C13.3781 20.4154 14.4288 20.2932 15.394 20.0733L13.2437 17.923C12.9138 17.9474 12.5718 17.9719 12.2175 17.9719C5.68111 17.9719 3.1521 13.2682 2.52901 11.8631C2.99328 10.8369 3.61637 9.88392 4.37385 9.05313L2.6634 7.34269C0.794134 9.383 0 11.7288 0 11.8631C0 11.9975 2.89554 20.4154 12.2175 20.4154ZM12.2175 3.31093C9.96944 3.31093 8.1246 3.79963 6.59742 4.50824L2.08918 0L0.781917 1.29505L21.9181 24.1417L24.0684 21.9914L20.0122 17.9352C23.2009 15.5528 24.4227 11.9853 24.4227 11.8631C24.4227 11.741 21.5271 3.31093 12.2052 3.31093H12.2175ZM18.2895 16.2126C17.361 15.284 16.4325 14.3555 15.5039 13.427C14.6976 12.6206 13.8912 11.8021 13.0849 10.9957C12.2785 10.1894 11.46 9.39522 10.6536 8.57665C9.90835 7.8436 9.17531 7.09834 8.44226 6.36529C9.65179 5.9499 10.9346 5.7422 12.2175 5.75442C18.7538 5.75442 21.2828 10.4581 21.9059 11.8631C21.5394 12.7061 20.4764 14.722 18.3017 16.2126H18.2895Z"},null,-1)]))):(r(),s("svg",I,t[5]||(t[5]=[o("path",{d:"M12.2785 10.9964C13.628 10.9964 14.7219 9.90237 14.7219 8.55287C14.7219 7.20336 13.628 6.10938 12.2785 6.10938C10.9289 6.10938 9.83496 7.20336 9.83496 8.55287C9.83496 9.90237 10.9289 10.9964 12.2785 10.9964Z","stroke-width":"2","stroke-miterlimit":"10"},null,-1),o("path",{d:"M12.2785 0C2.95662 0 0.158827 8.08795 0.134392 8.16126L0 8.55222L0.122175 8.94317C0.146609 9.0287 2.95662 17.1044 12.2785 17.1044C21.6005 17.1044 24.4105 9.01648 24.4349 8.94317L24.5693 8.55222L24.4471 8.16126C24.4227 8.07574 21.6127 0 12.2908 0H12.2785ZM12.2785 14.6609C5.7422 14.6609 3.21319 9.95722 2.5901 8.55222C3.20097 7.13499 5.7422 2.44349 12.2785 2.44349C18.8149 2.44349 21.3439 7.14721 21.967 8.55222C21.3561 9.96944 18.8149 14.6609 12.2785 14.6609Z"},null,-1)])))])):a("",!0),e.wordCount?(r(),s("div",D,n(e.value.length||0)+" / "+n(e.wordCount),1)):a("",!0)]),e.help?(r(),s("div",P,n(e.help),1)):a("",!0),o("div",T,[(r(!0),s(b,null,k(e.errors,i=>(r(),s("div",z,n(i),1))),256))])]))}}),A=L(N,[["__scopeId","data-v-44b56318"]]);export{A as default};