import{a as H,b as J,c as K}from"./chunk-TMVLLXX5.js";import{C as G,E as U,a as j,f as A,m as R,w as W}from"./chunk-K7KAWBRR.js";import{xa as z,ya as Z}from"./chunk-QH7CG3K4.js";import{D as O,K as N,p as F}from"./chunk-HJI5FNS6.js";import{$c as D,Ac as v,Bb as o,Bc as _,Bd as B,Dc as k,Hc as I,Ic as w,Ja as g,Jc as M,Ka as s,Kc as x,La as u,Ld as a,Rb as f,Sd as P,Ua as h,Xb as C,Yc as E,_c as L,ed as S,fd as T,gd as V,jc as y,kc as d,kd as q,mc as p,sa as m,xc as b,yc as c}from"./chunk-XJKQ67XR.js";import{e as Y}from"./chunk-SZAW6ZBW.js";function ee(n,Q){if(n&1&&(v(0),L(1),_()),n&2){let e=w();o(),D(e.label)}}function ie(n,Q){n&1&&x(0)}var $,ne,fe,te=Y(()=>{P();N();U();K();Z();P();N();U();K();$=["*"];ne=0,fe=(()=>{class n{constructor(){this.binary=!0,this.disabled=!1,this.readonly=!1,this.required=!1,this.value=null,this.labelPosition="right",this.changed=new h,this.onChange=new h,this.model=null,this.onChangeFn=()=>{},this.onTouched=()=>{},this._autoId=`dvl-cb-${++ne}`}get resolvedId(){return this.inputId??this._autoId}ngOnChanges(e){"binary"in e&&(this.model===null||this.model===void 0)&&(this.model=this.binary?!1:[])}onModelChange(e){this.model=e,this.onChangeFn(e),this.changed.emit(e),this.onChange.emit(e)}writeValue(e){this.model=e??(this.binary?!1:[])}registerOnChange(e){this.onChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}static{this.\u0275fac=function(r){return new(r||n)}}static{this.\u0275cmp=f({type:n,selectors:[["dvl-checkbox"]],hostAttrs:[1,"inline-block"],inputs:{binary:[2,"binary","binary",a],disabled:[2,"disabled","disabled",a],readonly:[2,"readonly","readonly",a],required:[2,"required","required",a],value:"value",name:"name",label:"label",labelPosition:"labelPosition",inputId:"inputId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy"},outputs:{changed:"changed",onChange:"onChange"},features:[q([{provide:j,useExisting:m(()=>n),multi:!0}]),g],ngContentSelectors:$,decls:6,vars:19,consts:[["projected",""],[1,"inline-flex","items-center","gap-2"],[3,"ngModelChange","binary","ngModel","disabled","readonly","required","name","inputId","ariaLabel","ariaLabelledBy","value"],[1,"select-none"],[4,"ngIf","ngIfElse"]],template:function(r,i){if(r&1){let l=k();M(),b(0,"div",1)(1,"p-checkbox",2),V("ngModelChange",function(t){return s(l),T(i.model,t)||(i.model=t),u(t)}),I("ngModelChange",function(t){return s(l),u(i.onModelChange(t))}),c(),b(2,"label",3),C(3,ee,2,1,"ng-container",4)(4,ie,1,0,"ng-template",null,0,B),c()()}if(r&2){let l=E(5);p("flex-row-reverse",i.labelPosition==="left"),o(),d("binary",i.binary),S("ngModel",i.model),d("disabled",i.disabled)("readonly",i.readonly)("required",i.required)("name",i.name)("inputId",i.resolvedId)("ariaLabel",i.ariaLabel)("ariaLabelledBy",i.ariaLabelledBy)("value",i.binary?null:i.value),o(),p("p-disabled",i.disabled)("cursor-pointer",!i.disabled),y("for",i.resolvedId),o(),d("ngIf",i.label!==void 0)("ngIfElse",l)}},dependencies:[O,F,G,A,W,R,J,H,z],styles:[`dvl-checkbox .p-checkbox:focus-visible,dvl-checkbox .p-checkbox-box:focus-visible,dvl-checkbox .p-checkbox .p-focus{outline:transparent!important;box-shadow:none!important}
`],encapsulation:2})}}return n})()});export{fe as a,te as b};
