import{A as et,a as W,c as q,g as J,l as tt}from"./chunk-K34LZIA3.js";import{a as M}from"./chunk-BUPI2ADN.js";import{$ as R,Ab as O,Bb as H,Ca as s,Cb as $,Da as b,Gb as U,Hb as X,Ib as z,Jb as T,Kb as I,Ma as D,Mb as Q,Na as v,Nb as Y,Ua as k,Va as p,Vf as nt,X as N,Y as A,ba as C,cb as m,db as c,dc as P,eb as f,ib as E,kc as Z,la as u,ma as d,mb as F,qb as g,rb as h,rc as w,sb as V,tb as G,tc as K,xb as j,yb as L,zb as B}from"./chunk-X3RCWQ3R.js";import{i as r}from"./chunk-SR6RTMQI.js";var S=class{constructor(t,a){this._document=a;let e=this._textarea=this._document.createElement("textarea"),o=e.style;o.position="fixed",o.top=o.opacity="0",o.left="-999em",e.setAttribute("aria-hidden","true"),e.value=t,e.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(e);}copy(){let t=this._textarea,a=!1;try{if(t){let e=this._document.activeElement;t.select(),t.setSelectionRange(0,t.value.length),a=this._document.execCommand("copy"),e&&e.focus();}}catch{}return a;}destroy(){let t=this._textarea;t&&(t.remove(),this._textarea=void 0);}},x=(()=>{let t=class t{constructor(e){this._document=e;}copy(e){let o=this.beginCopy(e),n=o.copy();return o.destroy(),n;}beginCopy(e){return new S(e,this._document);}};t.ɵfac=function(o){return new(o||t)(R(Z));},t.ɵprov=A({token:t,factory:t.ɵfac,providedIn:"root"});let i=t;return i;})();var at=["*"],pt=(i,t)=>({"is-input-group":i,"with-border":t}),ot=(()=>{let t=class t{constructor(e,o){r(this,"notifier");r(this,"clipboard");r(this,"value");r(this,"elementContent");r(this,"title");r(this,"notification");r(this,"withBorder",!1);r(this,"isInputGroup",!1);this.notifier=e,this.clipboard=o;}copy(){var e;this.clipboard.copy(this.value||((e=this.elementContent)==null?void 0:e.innerText)),this.notification&&this.notifier.success(this.notification);}};r(t,"\u0275fac",function(o){return new(o||t)(b(nt),b(x));}),r(t,"\u0275cmp",C({type:t,selectors:[["my-copy-button"]],inputs:{value:"value",elementContent:"elementContent",title:"title",notification:"notification",withBorder:[2,"withBorder","withBorder",P],isInputGroup:[2,"isInputGroup","isInputGroup",P]},standalone:!0,features:[T([x]),D,I],ngContentSelectors:at,decls:3,vars:5,consts:[["type","button",1,"btn","copy-button",3,"click","title","ngClass"],["iconName","copy"]],template:function(o,n){o&1&&(V(),m(0,"button",0),g("click",function(){return n.copy();}),f(1,"my-global-icon",1),G(2),c()),o&2&&p("title",n.title)("ngClass",Y(2,pt,n.isInputGroup,n.withBorder));},dependencies:[w,M],styles:[`button[_ngcontent-%COMP%]:not(.with-border, .is-input-group)[_ngcontent-%COMP%]{border:0}.is-input-group[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}my-global-icon[_ngcontent-%COMP%]{display:inline-block;width:15px;height:15px;line-height:15px;margin-inline-end:.3125rem}
/*# sourceMappingURL=copy-button.component-O5AJQ3QA.css.map */`]}));let i=t;return i;})();var lt=["input"],st=i=>({"input-error":i});function ct(i,t){i&1&&f(0,"my-global-icon",10);}function ut(i,t){i&1&&f(0,"my-global-icon",11);}function dt(i,t){if(i&1){let a=E();m(0,"button",7),g("click",function(){u(a);let o=h();return d(o.toggle());}),v(1,ct,1,0,"my-global-icon",8)(2,ut,1,0,"my-global-icon",9),c();}if(i&2){let a=h();p("title",a.toggleTitle),s(),p("ngIf",a.show),s(),p("ngIf",!a.show);}}function mt(i,t){if(i&1&&(m(0,"my-copy-button",12),F(1,1),c()),i&2){h();let a=O(2);p("value",a.value)("isInputGroup",!0);}}function gt(i,t){if(i&1&&(m(0,"div",13),H(1),c()),i&2){let a=h();s(),$(a.formError);}}var Gt=(()=>{let t=class t{constructor(){r(this,"inputElement");r(this,"inputId");r(this,"value","");r(this,"autocomplete","off");r(this,"placeholder","");r(this,"tabindex",0);r(this,"withToggle",!0);r(this,"withCopy",!1);r(this,"readonly",!1);r(this,"show",!1);r(this,"formError");r(this,"autofocus",!1);r(this,"ariaLabel");r(this,"propagateChange",e=>{});}get inputType(){return this.show?"text":"password";}get toggleTitle(){return this.show?"Ffer":"Sken";}ngAfterViewInit(){this.autofocus===!0&&this.inputElement.nativeElement.focus({preventScroll:!0});}toggle(){this.show=!this.show;}writeValue(e){this.value=e;}registerOnChange(e){this.propagateChange=e;}registerOnTouched(){}update(){this.propagateChange(this.value);}focus(){this.inputElement.nativeElement.focus({preventScroll:!0});}};r(t,"\u0275fac",function(o){return new(o||t)();}),r(t,"\u0275cmp",C({type:t,selectors:[["my-input-text"]],viewQuery:function(o,n){if(o&1&&j(lt,5),o&2){let l;L(l=B())&&(n.inputElement=l.first);}},inputs:{inputId:"inputId",value:"value",autocomplete:"autocomplete",placeholder:"placeholder",tabindex:"tabindex",withToggle:"withToggle",withCopy:"withCopy",readonly:"readonly",show:"show",formError:"formError",autofocus:"autofocus",ariaLabel:"ariaLabel"},standalone:!0,features:[T([{provide:W,useExisting:N(()=>t),multi:!0}]),I],decls:6,vars:16,consts:()=>{let e;e="Ittusuken(te)";let o;return o=" COPY ",[["input",""],o,[1,"input-group"],[1,"form-control",3,"ngModelChange","click","input","change","id","name","autocomplete","value","placeholder","tabindex","ngModel","readonly","type","ngClass"],["type","button","class","btn",3,"title","click",4,"ngIf"],["notification",e,3,"value","isInputGroup",4,"ngIf"],["class","form-error","role","alert",4,"ngIf"],["type","button",1,"btn",3,"click","title"],["iconName","eye-open",4,"ngIf"],["iconName","eye-close",4,"ngIf"],["iconName","eye-open"],["iconName","eye-close"],["notification",e,3,"value","isInputGroup"],["role","alert",1,"form-error"]];},template:function(o,n){if(o&1){let l=E();m(0,"div",2)(1,"input",3,0),z("ngModelChange",function(_){return u(l),X(n.value,_)||(n.value=_),d(_);}),g("ngModelChange",function(){return u(l),d(n.update());})("click",function(){u(l);let _=O(2);return d(_.select());})("input",function(){return u(l),d(n.update());})("change",function(){return u(l),d(n.update());}),c(),v(3,dt,3,3,"button",4)(4,mt,2,2,"my-copy-button",5),c(),v(5,gt,2,1,"div",6);}o&2&&(s(),p("id",n.inputId)("name",n.inputId)("autocomplete",n.autocomplete)("value",n.value)("placeholder",n.placeholder)("tabindex",n.tabindex),U("ngModel",n.value),p("readonly",n.readonly)("type",n.inputType)("ngClass",Q(14,st,n.formError)),k("aria-label",n.ariaLabel),s(2),p("ngIf",n.withToggle),s(),p("ngIf",n.withCopy),s(),p("ngIf",n.formError));},dependencies:[et,q,J,tt,w,K,M,ot],styles:[`input[_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:auto;max-width:auto;color:var(--input-fg);background-color:var(--input-bg);border:1px solid var(--input-border-color);border-radius:4px;line-height:24px;padding-inline-start:.9375rem!important;padding-inline-end:.9375rem!important}input[_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder);font-size:14px}input[readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[_ngcontent-%COMP%]:focus, input[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[disabled][_ngcontent-%COMP%]{opacity:.4}@media screen and (max-width: calc(auto + 40px)){input[_ngcontent-%COMP%]{width:100%}}.btn[_ngcontent-%COMP%], my-copy-button[_ngcontent-%COMP%]     .btn{background-color:var(--bg-secondary-400);border-left:1px solid var(--bg)}.btn[_ngcontent-%COMP%]:hover, my-copy-button[_ngcontent-%COMP%]     .btn:hover{background-color:var(--bg-secondary-450)}.btn[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{position:relative;top:0;right:0;display:inline-block;width:18px;height:18px;line-height:18px}.btn[_ngcontent-%COMP%]:not(.icon-only)   my-global-icon[_ngcontent-%COMP%]{margin-inline-end:.1875rem}.copy-text[_ngcontent-%COMP%]{font-size:14px;margin-left:5px;vertical-align:top}
/*# sourceMappingURL=input-text.component-TVRAKZGM.css.map */`]}));let i=t;return i;})();export{ot as a,Gt as b};/**i18n:3d16453f213eb5db982e7e7dd90631843ac5d3f860726a614777c3e9e3f9b57e*///# sourceMappingURL=chunk-3KEQAXSL.js.map