import{B as q,a as O}from"./chunk-A32B57A4.js";import{w as R,x as Q,y as j}from"./chunk-4EQLHXW7.js";import{C as N,j as T,p as D,y as B}from"./chunk-Z5RJRCWC.js";import{Ad as A,Eb as w,Gd as L,Ja as o,Jc as v,Ka as l,Kc as S,Lc as I,Ob as C,Pb as g,Sa as y,bd as M,dc as s,ec as d,fd as E,ic as V,qc as c,ra as m,rc as p,sc as _,ta as b,ud as F,wc as k,zb as u,zc as h,zd as r}from"./chunk-JSJB5BKT.js";import{e as W}from"./chunk-SZAW6ZBW.js";var G,H,z,J,re,K=W(()=>{N();N();L();L();q();j();j();G=["input"],H=(i,U,t)=>({"p-inputswitch p-component":!0,"p-inputswitch-checked":i,"p-disabled":U,"p-focus":t}),z={provide:O,useExisting:m(()=>J),multi:!0},J=(()=>{class i{cd;style;styleClass;tabindex;inputId;name;disabled;readonly;trueValue=!0;falseValue=!1;ariaLabel;ariaLabelledBy;autofocus;onChange=new y;input;modelValue=!1;focused=!1;onModelChange=()=>{};onModelTouched=()=>{};constructor(t){this.cd=t}onClick(t){!this.disabled&&!this.readonly&&(this.modelValue=this.checked()?this.falseValue:this.trueValue,this.onModelChange(this.modelValue),this.onChange.emit({originalEvent:t,checked:this.modelValue}),this.input.nativeElement.focus())}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}writeValue(t){this.modelValue=t,this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}checked(){return this.modelValue===this.trueValue}static \u0275fac=function(n){return new(n||i)(w(F))};static \u0275cmp=C({type:i,selectors:[["p-inputSwitch"]],viewQuery:function(n,e){if(n&1&&v(G,5),n&2){let a;S(a=I())&&(e.input=a.first)}},hostAttrs:[1,"p-element"],inputs:{style:"style",styleClass:"styleClass",tabindex:[2,"tabindex","tabindex",A],inputId:"inputId",name:"name",disabled:[2,"disabled","disabled",r],readonly:[2,"readonly","readonly",r],trueValue:"trueValue",falseValue:"falseValue",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",autofocus:[2,"autofocus","autofocus",r]},outputs:{onChange:"onChange"},standalone:!1,features:[M([z])],decls:5,vars:23,consts:[["input",""],[3,"click","ngClass","ngStyle"],[1,"p-hidden-accessible"],["type","checkbox","role","switch","pAutoFocus","",3,"focus","blur","checked","disabled","autofocus"],[1,"p-inputswitch-slider"]],template:function(n,e){if(n&1){let a=k();c(0,"div",1),h("click",function(P){return o(a),l(e.onClick(P))}),c(1,"div",2)(2,"input",3,0),h("focus",function(){return o(a),l(e.onFocus())})("blur",function(){return o(a),l(e.onBlur())}),p()(),_(4,"span",4),p()}n&2&&(V(e.styleClass),d("ngClass",E(19,H,e.checked(),e.disabled,e.focused))("ngStyle",e.style),s("data-pc-name","inputswitch")("data-pc-section","root"),u(),s("data-pc-section","hiddenInputWrapper")("data-p-hidden-accessible",!0),u(),d("checked",e.checked())("disabled",e.disabled)("autofocus",e.autofocus),s("id",e.inputId)("aria-checked",e.checked())("aria-labelledby",e.ariaLabelledBy)("aria-label",e.ariaLabel)("name",e.name)("tabindex",e.tabindex)("data-pc-section","hiddenInput"),u(2),s("data-pc-section","slider"))},dependencies:[T,D,R],styles:[`@layer primeng{.p-inputswitch{position:relative;display:inline-block;-webkit-user-select:none;user-select:none}.p-inputswitch-slider{position:absolute;cursor:pointer;inset:0;border:1px solid transparent}.p-inputswitch-slider:before{position:absolute;content:"";top:50%}}
`],encapsulation:2,changeDetection:0})}return i})(),re=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=g({type:i});static \u0275inj=b({imports:[B,Q]})}return i})()});export{J as a,re as b,K as c};
