import{C as pt,E as J,a as Q,f as gt,m as dt}from"./chunk-TCUK52QT.js";import{d as K,e as ht,i as q,j as ft,oa as mt,qa as xt}from"./chunk-VYRWAFSM.js";import{Ha as j,Ia as g,La as bt,aa as R,ba as x,xa as kt}from"./chunk-2XIOYYFS.js";import{D as N,K as P,m as ut,t as A}from"./chunk-UOI75ONS.js";import{Ab as d,Ad as ct,Bc as k,Cc as lt,Dc as at,Gc as F,Hc as s,Ja as X,Ka as Z,Kd as u,Ld as V,Na as m,Qb as L,Qc as p,Rb as O,Rd as z,Sc as b,Ta as C,Tc as h,Ub as M,Vb as tt,Wb as r,Zc as st,_c as rt,ic as y,jc as c,jd as D,lc as S,ld as Y,mc as et,md as I,nc as G,ra as $,rc as _,sa as B,ta as E,uc as ot,vc as nt,wc as v,xc as T,ya as w,yc as it}from"./chunk-4HFZZ7HS.js";import{e as W}from"./chunk-SZAW6ZBW.js";function Ot(t,a){t&1&&k(0)}function Mt(t,a){if(t&1&&it(0,"span",0),t&2){let e=s(3);G(e.checked?e.onIcon:e.offIcon),c("ngClass",I(4,Lt,e.iconPos==="left",e.iconPos==="right")),y("data-pc-section","icon")}}function St(t,a){if(t&1&&r(0,Mt,1,7,"span",2),t&2){let e=s(2);_(e.onIcon||e.offIcon?0:-1)}}function Ft(t,a){t&1&&k(0)}function Dt(t,a){if(t&1&&r(0,Ft,1,0,"ng-container",1),t&2){let e=s(2);c("ngTemplateOutlet",e.iconTemplate||e._iconTemplate)("ngTemplateOutletContext",Y(2,_t,e.checked))}}function It(t,a){if(t&1&&(r(0,St,1,1)(1,Dt,1,4,"ng-container"),v(2,"span",0),st(3),T()),t&2){let e=s();_(e.iconTemplate?1:0),d(2),c("ngClass",e.cx("label")),y("data-pc-section","label"),d(),rt(e.checked?e.hasOnLabel?e.onLabel:"\xA0":e.hasOffLabel?e.offLabel:"\xA0")}}var Et,wt,_t,Lt,Vt,zt,yt,At,H,pe,Ct=W(()=>{z();z();ht();P();P();J();bt();ft();xt();Et=["icon"],wt=["content"],_t=t=>({$implicit:t}),Lt=(t,a)=>({"p-togglebutton-icon":!0,"p-togglebutton-icon-left":t,"p-togglebutton-icon-right":a});Vt=({dt:t})=>`
.p-togglebutton {
    display: inline-flex;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
    position: relative;
    color: ${t("togglebutton.color")};
    background: ${t("togglebutton.background")};
    border: 1px solid ${t("togglebutton.border.color")};
    padding: ${t("togglebutton.padding")};
    font-size: 1rem;
    font-family: inherit;
    font-feature-settings: inherit;
    transition: background ${t("togglebutton.transition.duration")}, color ${t("togglebutton.transition.duration")}, border-color ${t("togglebutton.transition.duration")},
        outline-color ${t("togglebutton.transition.duration")}, box-shadow ${t("togglebutton.transition.duration")};
    border-radius: ${t("togglebutton.border.radius")};
    outline-color: transparent;
    font-weight: ${t("togglebutton.font.weight")};
}

.p-togglebutton-content {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: ${t("togglebutton.gap")};
    padding: ${t("togglebutton.content.padding")};
    background: transparent;
    border-radius: ${t("togglebutton.content.border.radius")};
    transition: background ${t("togglebutton.transition.duration")}, color ${t("togglebutton.transition.duration")}, border-color ${t("togglebutton.transition.duration")},
            outline-color ${t("togglebutton.transition.duration")}, box-shadow ${t("togglebutton.transition.duration")};
}

.p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover {
    background: ${t("togglebutton.hover.background")};
    color: ${t("togglebutton.hover.color")};
}

.p-togglebutton.p-togglebutton-checked {
    background: ${t("togglebutton.checked.background")};
    border-color: ${t("togglebutton.checked.border.color")};
    color: ${t("togglebutton.checked.color")};
}

.p-togglebutton-checked .p-togglebutton-content {
    background: ${t("togglebutton.content.checked.background")};
    box-shadow: ${t("togglebutton.content.checked.shadow")};
}

.p-togglebutton:focus-visible {
    box-shadow: ${t("togglebutton.focus.ring.shadow")};
    outline: ${t("togglebutton.focus.ring.width")} ${t("togglebutton.focus.ring.style")} ${t("togglebutton.focus.ring.color")};
    outline-offset: ${t("togglebutton.focus.ring.offset")};
}

.p-togglebutton.p-invalid {
    border-color: ${t("togglebutton.invalid.border.color")};
}

.p-togglebutton:disabled:not(.p-togglebutton-checked) {
    opacity: 1;
    cursor: default;
    background: ${t("togglebutton.disabled.background")};
    border-color: ${t("togglebutton.disabled.border.color")};
    color: ${t("togglebutton.disabled.color")};
}

.p-togglebutton-label,
.p-togglebutton-icon {
    position: relative;
    transition: none;
}

.p-togglebutton-icon {
    color: ${t("togglebutton.icon.color")};
}

.p-togglebutton:not(:disabled):not(.p-togglebutton-checked):hover .p-togglebutton-icon {
    color: ${t("togglebutton.icon.hover.color")};
}

.p-togglebutton.p-togglebutton-checked .p-togglebutton-icon {
    color: ${t("togglebutton.icon.checked.color")};
}

.p-togglebutton:disabled .p-togglebutton-icon {
    color: ${t("togglebutton.icon.disabled.color")};
}

.p-togglebutton-sm {
    padding: ${t("togglebutton.sm.padding")};
    font-size: ${t("togglebutton.sm.font.size")};
}

.p-togglebutton-sm .p-togglebutton-content {
    padding: ${t("togglebutton.content.sm.padding")};
}

.p-togglebutton-lg {
    padding: ${t("togglebutton.lg.padding")};
    font-size: ${t("togglebutton.lg.font.size")};
}

.p-togglebutton-lg .p-togglebutton-content {
    padding: ${t("togglebutton.content.lg.padding")};
}

/* For PrimeNG (iconPos) */
.p-togglebutton-icon-right {
    order: 1;
}

.p-togglebutton.ng-invalid.ng-dirty {
    border-color: ${t("togglebutton.invalid.border.color")};
}
`,zt={root:({instance:t})=>({"p-togglebutton p-component":!0,"p-togglebutton-checked":t.checked,"p-disabled":t.disabled,"p-togglebutton-sm p-inputfield-sm":t.size==="small","p-togglebutton-lg p-inputfield-lg":t.size==="large"}),content:"p-togglebutton-content",icon:"p-togglebutton-icon",label:"p-togglebutton-label"},yt=(()=>{class t extends K{name="togglebutton";theme=Vt;classes=zt;static \u0275fac=(()=>{let e;return function(o){return(e||(e=m(t)))(o||t)}})();static \u0275prov=B({token:t,factory:t.\u0275fac})}return t})(),At={provide:Q,useExisting:$(()=>H),multi:!0},H=(()=>{class t extends q{get hostClass(){return this.styleClass||""}onKeyDown(e){switch(e.code){case"Enter":this.toggle(e),e.preventDefault();break;case"Space":this.toggle(e),e.preventDefault();break}}toggle(e){!this.disabled&&!(this.allowEmpty===!1&&this.checked)&&(this.checked=!this.checked,this.onModelChange(this.checked),this.onModelTouched(),this.onChange.emit({originalEvent:e,checked:this.checked}),this.cd.markForCheck())}onLabel="Yes";offLabel="No";onIcon;offIcon;ariaLabel;ariaLabelledBy;disabled;style;styleClass;inputId;tabindex=0;size;iconPos="left";autofocus;allowEmpty;onChange=new C;iconTemplate;contentTemplate;templates;checked=!1;onModelChange=()=>{};onModelTouched=()=>{};_componentStyle=w(yt);onBlur(){this.onModelTouched()}writeValue(e){this.checked=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}get hasOnLabel(){return this.onLabel&&this.onLabel.length>0}get hasOffLabel(){return this.onLabel&&this.onLabel.length>0}get active(){return this.checked===!0}_iconTemplate;_contentTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"icon":this._iconTemplate=e.template;break;case"content":this._contentTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=m(t)))(o||t)}})();static \u0275cmp=L({type:t,selectors:[["p-toggleButton"],["p-togglebutton"],["p-toggle-button"]],contentQueries:function(n,o,i){if(n&1&&(p(i,Et,4),p(i,wt,4),p(i,j,4)),n&2){let l;b(l=h())&&(o.iconTemplate=l.first),b(l=h())&&(o.contentTemplate=l.first),b(l=h())&&(o.templates=l)}},hostVars:23,hostBindings:function(n,o){n&1&&F("keydown",function(l){return o.onKeyDown(l)})("click",function(l){return o.toggle(l)}),n&2&&(at("tabindex",o.tabindex),y("disabled",o.disabled)("aria-labelledby",o.ariaLabelledBy)("aria-pressed",o.checked)("data-p-checked",o.active)("data-p-disabled",o.disabled)("type","button"),G(o.hostClass),S("p-togglebutton",!0)("p-togglebutton-checked",o.checked)("p-disabled",o.disabled)("p-togglebutton-sm",o.size==="small")("p-inputfield-sm",o.size==="small")("p-togglebutton-lg",o.size==="large")("p-inputfield-lg",o.size==="large"))},inputs:{onLabel:"onLabel",offLabel:"offLabel",onIcon:"onIcon",offIcon:"offIcon",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",disabled:[2,"disabled","disabled",u],style:"style",styleClass:"styleClass",inputId:"inputId",tabindex:[2,"tabindex","tabindex",V],size:"size",iconPos:"iconPos",autofocus:[2,"autofocus","autofocus",u],allowEmpty:"allowEmpty"},outputs:{onChange:"onChange"},features:[D([At,yt]),tt([mt]),M],decls:3,vars:6,consts:[[3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class","ngClass"]],template:function(n,o){n&1&&(v(0,"span",0),r(1,Ot,1,0,"ng-container",1)(2,It,4,4),T()),n&2&&(c("ngClass",o.cx("content")),d(),c("ngTemplateOutlet",o.contentTemplate||o._contentTemplate)("ngTemplateOutletContext",Y(4,_t,o.checked)),d(),_(o.contentTemplate?-1:2))},dependencies:[N,ut,A,g],encapsulation:2,changeDetection:0})}return t})(),pe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=O({type:t});static \u0275inj=E({imports:[H,g,g]})}return t})()});function Qt(t,a){return this.getOptionLabel(a)}function Rt(t,a){t&1&&k(0)}function jt(t,a){if(t&1&&r(0,Rt,1,0,"ng-container",3),t&2){let e=s(2),n=e.$implicit,o=e.$index,i=s();c("ngTemplateOutlet",i.itemTemplate||i._itemTemplate)("ngTemplateOutletContext",I(2,Pt,n,o))}}function Kt(t,a){t&1&&r(0,jt,1,5,"ng-template",null,0,ct)}function qt(t,a){if(t&1){let e=lt();v(0,"p-toggleButton",2),F("onChange",function(o){let i=X(e),l=i.$implicit,f=i.$index,U=s();return Z(U.onOptionSelect(o,l,f))}),r(1,Kt,2,0),T()}if(t&2){let e=a.$implicit,n=s();c("autofocus",n.autofocus)("styleClass",n.styleClass)("ngModel",n.isSelected(e))("onLabel",n.getOptionLabel(e))("offLabel",n.getOptionLabel(e))("disabled",n.disabled||n.isOptionDisabled(e))("allowEmpty",n.getAllowEmpty())("size",n.size),d(),_(n.itemTemplate||n._itemTemplate?1:-1)}}var Nt,Pt,Ht,Ut,vt,Gt,Tt,Fe,Yt=W(()=>{P();P();z();z();J();J();kt();bt();ft();Ct();ht();Nt=["item"],Pt=(t,a)=>({$implicit:t,index:a});Ht=({dt:t})=>`
.p-selectbutton {
    display: inline-flex;
    user-select: none;
    vertical-align: bottom;
    outline-color: transparent;
    border-radius: ${t("selectbutton.border.radius")};
}

.p-selectbutton .p-togglebutton {
    border-radius: 0;
    border-width: 1px 1px 1px 0;
}

.p-selectbutton .p-togglebutton:focus-visible {
    position: relative;
    z-index: 1;
}

.p-selectbutton .p-togglebutton:first-child {
    border-inline-start-width: 1px;
    border-start-start-radius: ${t("selectbutton.border.radius")};
    border-end-start-radius: ${t("selectbutton.border.radius")};
}

.p-selectbutton .p-togglebutton:last-child {
    border-start-end-radius: ${t("selectbutton.border.radius")};
    border-end-end-radius: ${t("selectbutton.border.radius")};
}

.p-selectbutton.ng-invalid.ng-dirty {
    outline: 1px solid ${t("selectbutton.invalid.border.color")};
    outline-offset: 0;
}
`,Ut={root:({props:t})=>["p-selectbutton p-component",{"p-invalid":t.invalid}]},vt=(()=>{class t extends K{name="selectbutton";theme=Ht;classes=Ut;static \u0275fac=(()=>{let e;return function(o){return(e||(e=m(t)))(o||t)}})();static \u0275prov=B({token:t,factory:t.\u0275fac})}return t})(),Gt={provide:Q,useExisting:$(()=>Tt),multi:!0},Tt=(()=>{class t extends q{options;optionLabel;optionValue;optionDisabled;get unselectable(){return this._unselectable}_unselectable=!1;set unselectable(e){this._unselectable=e,this.allowEmpty=!e}tabindex=0;multiple;allowEmpty=!0;style;styleClass;ariaLabelledBy;size;disabled;dataKey;autofocus;onOptionClick=new C;onChange=new C;itemTemplate;_itemTemplate;get equalityKey(){return this.optionValue?null:this.dataKey}value;onModelChange=()=>{};onModelTouched=()=>{};focusedIndex=0;_componentStyle=w(vt);getAllowEmpty(){return this.multiple?this.allowEmpty||this.value?.length!==1:this.allowEmpty}getOptionLabel(e){return this.optionLabel?R(e,this.optionLabel):e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?R(e,this.optionValue):this.optionLabel||e.value===void 0?e:e.value}isOptionDisabled(e){return this.optionDisabled?R(e,this.optionDisabled):e.disabled!==void 0?e.disabled:!1}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionSelect(e,n,o){if(this.disabled||this.isOptionDisabled(n))return;let i=this.isSelected(n);if(i&&this.unselectable)return;let l=this.getOptionValue(n),f;if(this.multiple)i?f=this.value.filter(U=>!x(U,l,this.equalityKey)):f=this.value?[...this.value,l]:[l];else{if(i&&!this.allowEmpty)return;f=i?null:l}this.focusedIndex=o,this.value=f,this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),this.onOptionClick.emit({originalEvent:e,option:n,index:o})}changeTabIndexes(e,n){let o,i;for(let l=0;l<=this.el.nativeElement.children.length-1;l++)this.el.nativeElement.children[l].getAttribute("tabindex")==="0"&&(o={elem:this.el.nativeElement.children[l],index:l});n==="prev"?o.index===0?i=this.el.nativeElement.children.length-1:i=o.index-1:o.index===this.el.nativeElement.children.length-1?i=0:i=o.index+1,this.focusedIndex=i,this.el.nativeElement.children[i].focus()}onFocus(e,n){this.focusedIndex=n}onBlur(){this.onModelTouched()}removeOption(e){this.value=this.value.filter(n=>!x(n,this.getOptionValue(e),this.dataKey))}isSelected(e){let n=!1,o=this.getOptionValue(e);if(this.multiple){if(this.value&&Array.isArray(this.value)){for(let i of this.value)if(x(i,o,this.dataKey)){n=!0;break}}}else n=x(this.getOptionValue(e),this.value,this.equalityKey);return n}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break}})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=m(t)))(o||t)}})();static \u0275cmp=L({type:t,selectors:[["p-selectButton"],["p-selectbutton"],["p-select-button"]],contentQueries:function(n,o,i){if(n&1&&(p(i,Nt,4),p(i,j,4)),n&2){let l;b(l=h())&&(o.itemTemplate=l.first),b(l=h())&&(o.templates=l)}},hostVars:10,hostBindings:function(n,o){n&2&&(y("role","group")("aria-labelledby",o.ariaLabelledBy)("data-pc-section","root")("data-pc-name","selectbutton"),et(o.style),S("p-selectbutton",!0)("p-component",!0))},inputs:{options:"options",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",unselectable:[2,"unselectable","unselectable",u],tabindex:[2,"tabindex","tabindex",V],multiple:[2,"multiple","multiple",u],allowEmpty:[2,"allowEmpty","allowEmpty",u],style:"style",styleClass:"styleClass",ariaLabelledBy:"ariaLabelledBy",size:"size",disabled:[2,"disabled","disabled",u],dataKey:"dataKey",autofocus:[2,"autofocus","autofocus",u]},outputs:{onOptionClick:"onOptionClick",onChange:"onChange"},features:[D([Gt,vt]),M],decls:2,vars:0,consts:[["content",""],[3,"autofocus","styleClass","ngModel","onLabel","offLabel","disabled","allowEmpty","size"],[3,"onChange","autofocus","styleClass","ngModel","onLabel","offLabel","disabled","allowEmpty","size"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,o){n&1&&ot(0,qt,2,9,"p-toggleButton",1,Qt,!0),n&2&&nt(o.options)},dependencies:[H,pt,gt,dt,N,A,g],encapsulation:2,changeDetection:0})}return t})(),Fe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=O({type:t});static \u0275inj=E({imports:[Tt,g,g]})}return t})()});export{pe as a,Ct as b,Tt as c,Fe as d,Yt as e};
