import{C as B,a as X,c as j,g as z,n as U,q}from"./chunk-Z4R7HYSO.js";import{Bb as R,Cc as H,Da as a,Db as r,Eb as w,Fb as N,Fc as h,La as O,Oc as k,Sb as x,Tb as P,Ub as V,X as D,Yb as F,Zb as y,Zc as W,_a as A,_b as T,aa as I,ab as g,bb as m,eb as f,ec as L,fa as s,fb as S,ga as u,gb as _,gc as $,hb as c,hc as G,ib as d,ii as Q,tb as b,xb as M,xc as p,yb as E,zb as v}from"./chunk-WSBGJRUM.js";import{i as C}from"./chunk-PMOLICDQ.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=""+"\uFFFD0\uFFFD"+"";let o;return o=""+"\uFFFD0\uFFFD"+"",[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:3907c1bc44ea3b180445250ac6c616b106e81f719372623351dcd73c005dc65a*///# sourceMappingURL=chunk-JR5Y24O6.js.map