import{E as B,a as X,c as j,g as z,o as U,r as q}from"./chunk-P7U3FVME.js";import{Da as a,Db as M,Eb as E,Ec as p,Fb as v,Hb as R,Ih as Q,Jb as r,Jc as H,Kb as w,Lb as N,Mc as h,Na as O,Wc as k,Y as D,Yb as x,Zb as P,_b as V,ba as I,cb as A,cc as F,dc as y,ec as T,fd as W,ga as s,gb as g,ha as u,hb as m,kb as f,kc as L,lb as S,mb as _,mc as $,nb as c,nc as G,ob as d,zb as b}from"./chunk-RB2SGB4Z.js";import{i as C}from"./chunk-IQVXR75E.js";var K=["*"],Y=i=>({"label-secondary":i}),Z=(i,n)=>({"btn-group":i,"btn-group-vertical":n}),J=(i,n)=>n.id;function ee(i,n){if(i&1&&(c(0,"label",3),x(1),d()),i&2){let e=r();_("for",e.inputId())("ngClass",$(3,Y,e.labelSecondary())),a(),P(e.label());}}function te(i,n){if(i&1){let e=b();c(0,"input",5),T("ngModelChange",function(o){s(e);let l=r(2);return y(l.value,o)||(l.value=o),u(o);}),R("ngModelChange",function(){s(e);let o=r(2);return u(o.update());}),d(),c(1,"label",6),M(2,0),d();}if(i&2){let e=n.$implicit,t=r(2);_("name",t.inputId())("id",t.getRadioId(e))("value",e.id),F("ngModel",t.value),a(),_("for",t.getRadioId(e)),A("data-label",e.label),a(),E(e.label),v(2);}}function ie(i,n){if(i&1&&(c(0,"div",4),f(1,te,3,7,null,null,J),d()),i&2){let e=r();_("ngClass",G(1,Z,!e.isInMobileView(),e.isInMobileView())),a(),S(e.items());}}function ne(i,n){if(i&1&&(c(0,"div",10),x(1),d()),i&2){let e=r().$implicit;a(),V(" ",e.description," ");}}function oe(i,n){if(i&1){let e=b();c(0,"div",7)(1,"input",8),T("ngModelChange",function(o){s(e);let l=r(2);return y(l.value,o)||(l.value=o),u(o);}),R("ngModelChange",function(){s(e);let o=r(2);return u(o.update());}),d(),c(2,"label",9),M(3,1),d(),g(4,ne,2,1,"div",10),d();}if(i&2){let e=n.$implicit,t=r(2);a(),_("name",t.inputId())("id",t.getRadioId(e))("value",e.id),F("ngModel",t.value),a(),_("for",t.getRadioId(e)),a(),E(e.label),v(3),a(),m(e.description?4:-1);}}function ae(i,n){if(i&1&&f(0,oe,5,7,"div",7,J),i&2){let e=r();S(e.items());}}var ge=(()=>{let n=class n{items=p.required();inputId=p.required();label=p();isGroup=p(!1,{transform:h});labelSecondary=p(!1,{transform:h});screenService=I(Q);value=H("");disabled=!1;wroteValue;propagateChange=t=>{};writeValue(t){this.value.set(t);}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}setDisabledState(t){this.disabled=t;}update(){this.propagateChange(this.value());}getRadioId(t){return this.inputId()+"-"+t.id;}isInMobileView(){return this.screenService.isInMobileView();}};C(n,"\u0275fac",function(o){return new(o||n)();}),C(n,"\u0275cmp",O({type:n,selectors:[["my-select-radio"]],inputs:{items:[1,"items"],inputId:[1,"inputId"],label:[1,"label"],isGroup:[1,"isGroup"],labelSecondary:[1,"labelSecondary"],value:[1,"value"]},outputs:{value:"valueChange"},features:[L([{provide:X,useExisting:D(()=>n),multi:!0}])],ngContentSelectors:K,decls:5,vars:2,consts:()=>{let t;t="";let o;return o="",[t,o,["role","radiogroup"],[3,"for","ngClass"],["role","group",3,"ngClass"],["type","radio","autocomplete","off",1,"btn-check",3,"ngModelChange","name","id","value","ngModel"],[1,"btn","btn-outline-primary",3,"for"],[1,"peertube-radio-container"],["type","radio","autocomplete","off",3,"ngModelChange","name","id","value","ngModel"],[3,"for"],[1,"form-group-description"]];},template:function(o,l){o&1&&(w(),c(0,"div",2),g(1,ee,2,5,"label",3),N(2),g(3,ie,3,4,"div",4)(4,ae,2,0),d()),o&2&&(a(),m(l.label()?1:-1),a(2),m(l.isGroup()?3:4));},dependencies:[B,j,q,z,U,W,k],styles:[`label[_ngcontent-%COMP%]{display:block}label.label-secondary[_ngcontent-%COMP%]{font-size:1rem;font-weight:400;color:var(--fg)}.peertube-radio-container[_ngcontent-%COMP%]{margin-bottom:.25rem}.peertube-radio-container[_ngcontent-%COMP%]   .form-group-description[_ngcontent-%COMP%]{margin-bottom:0}.btn-outline-primary[_ngcontent-%COMP%]:after{display:block;content:attr(data-label);font-weight:700;height:0;overflow:hidden;visibility:hidden}.btn-check[_ngcontent-%COMP%]:checked + .btn-outline-primary[_ngcontent-%COMP%]{font-weight:700;letter-spacing:0}
/*# sourceMappingURL=select-radio.component-TNQ6UMVA.css.map */`]}));let i=n;return i;})();export{ge as a};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-72XXIMS2.js.map