import{a as z,b as J,c as K}from"./chunk-TMVLLXX5.js";import{C as H,E as G,a as B,f as j,m as A,w as R}from"./chunk-K7KAWBRR.js";import{wa as $,ya as X}from"./chunk-QH7CG3K4.js";import{Ha as U,La as W}from"./chunk-5YPL7P3G.js";import{D as M,K as O,p as q}from"./chunk-HJI5FNS6.js";import{$c as F,Ac as x,Bb as n,Bc as I,Bd as P,Dc as w,Hc as k,Ic as m,Ja as f,Jc as S,Ka as b,Kc as D,La as g,Ld as o,Rb as _,Sd as V,Ua as C,Wb as v,Xb as r,Yc as E,_c as L,jc as y,kc as s,kd as N,mc as d,sa as h,xc as u,yc as p,zc as T}from"./chunk-XJKQ67XR.js";import{e as Q}from"./chunk-SZAW6ZBW.js";function Z(t,c){if(t&1&&T(0,"span",6),t&2){let e=m();d("pi-check",e.model===!0)("pi-minus",e.model===null)}}function ee(t,c){if(t&1&&(x(0),L(1),I()),t&2){let e=m();n(),F(e.label)}}function te(t,c){t&1&&D(0)}var Y,ie,_e,ne=Q(()=>{V();O();G();K();V();X();O();G();K();W();Y=["*"];ie=0,_e=(()=>{class t{constructor(){this.disabled=!1,this.readonly=!1,this.required=!1,this.allowNull=!0,this.labelPosition="right",this.changed=new C,this.model=null,this.uiChecked=!1,this.onChangeFn=()=>{},this.onTouchedFn=()=>{},this._autoId=`dvl-tscb-${++ie}`}get resolvedId(){return this.inputId??this._autoId}ngOnChanges(e){}writeValue(e){this.model=e===!0||e===!1||e===null?e:null,this.uiChecked=this.model===!0}registerOnChange(e){this.onChangeFn=e}registerOnTouched(e){this.onTouchedFn=e}setDisabledState(e){this.disabled=e}onToggle(){let e=this.nextValue(this.model);this.model=e,this.uiChecked=e===!0,this.onChangeFn(e),this.changed.emit(e)}nextValue(e){if(!this.allowNull)return e!==!0;switch(e){case null:return!0;case!0:return!1;default:return null}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=_({type:t,selectors:[["dvl-tristate-checkbox"]],hostAttrs:[1,"inline-block"],inputs:{disabled:[2,"disabled","disabled",o],readonly:[2,"readonly","readonly",o],required:[2,"required","required",o],allowNull:[2,"allowNull","allowNull",o],name:"name",label:"label",labelPosition:"labelPosition",inputId:"inputId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy"},outputs:{changed:"changed"},features:[N([{provide:B,useExisting:h(()=>t),multi:!0}]),v([{directive:$,inputs:["pTooltip","dvlTooltip","tooltipPosition","tooltipPosition","tooltipEvent","tooltipEvent","appendTo","appendTo","autoHide","autoHide","showDelay","showDelay","hideDelay","hideDelay","tooltipOptions","tooltipOptions","tooltipStyleClass","tooltipStyleClass"]}]),f],ngContentSelectors:Y,decls:7,vars:15,consts:[["projected",""],[1,"inline-flex","items-center","gap-2"],[3,"onChange","binary","ngModel","indeterminate","disabled","readonly","required","name","inputId","ariaLabel","ariaLabelledBy"],["pTemplate","icon"],[1,"cursor-pointer","select-none"],[4,"ngIf","ngIfElse"],[1,"pi"]],template:function(l,i){if(l&1){let a=w();S(),u(0,"div",1)(1,"p-checkbox",2),k("onChange",function(){return b(a),g(i.onToggle())}),r(2,Z,1,4,"ng-template",3),p(),u(3,"label",4),r(4,ee,2,1,"ng-container",5)(5,te,1,0,"ng-template",null,0,P),p()()}if(l&2){let a=E(6);d("flex-row-reverse",i.labelPosition==="left"),n(),s("binary",!0)("ngModel",i.uiChecked)("indeterminate",i.model===null)("disabled",i.disabled)("readonly",i.readonly)("required",i.required)("name",i.name)("inputId",i.resolvedId)("ariaLabel",i.ariaLabel)("ariaLabelledBy",i.ariaLabelledBy),n(2),y("for",i.resolvedId),n(),s("ngIf",i.label!==void 0)("ngIfElse",a)}},dependencies:[M,q,H,j,R,A,J,z,U],encapsulation:2})}}return t})()});export{_e as a,ne as b};
