import{C as Z,a as j,c as z,g as q,n as B,q as U}from"./chunk-AWFGIQSJ.js";import{Ab as M,Cb as v,Db as r,Eb as P,Fb as N,Gc as k,Ha as a,Ic as W,Qb as R,Ra as O,Rb as V,Rc as X,Sa as A,Sb as L,Th as J,Wb as x,X as I,Xb as F,Ya as m,Yb as y,aa as h,ac as $,cc as G,db as w,dc as H,eb as c,ha as s,ia as u,jb as D,mb as C,nb as f,ob as p,pb as d,ta as _,tc as T,ub as S,yb as E,zb as b}from"./chunk-GKQGDBUU.js";import{i as g}from"./chunk-QVFSZZWQ.js";var Q=["*"],Y=i=>({"label-secondary":i}),ee=(i,n)=>({"btn-group":i,"btn-group-vertical":n}),K=(i,n)=>n.id;function te(i,n){if(i&1&&(p(0,"label",5),R(1),d()),i&2){let e=r();c("for",e.inputId())("ngClass",G(3,Y,e.labelSecondary())),a(),V(e.label());}}function ie(i,n){if(i&1){let e=S();p(0,"input",6),y("ngModelChange",function(o){s(e);let l=r(2);return F(l.value,o)||(l.value=o),u(o);}),v("ngModelChange",function(){s(e);let o=r(2);return u(o.update());}),d(),p(1,"label",7),E(2,0),d();}if(i&2){let e=n.$implicit,t=r(2);c("name",t.inputId())("id",t.getRadioId(e))("value",e.id),x("ngModel",t.value),a(),c("for",t.getRadioId(e)),w("data-label",e.label),a(),b(e.label),M(2);}}function ne(i,n){if(i&1&&(p(0,"div",4),C(1,ie,3,7,null,null,K),d()),i&2){let e=r();c("ngClass",H(1,ee,!e.isInMobileView(),e.isInMobileView())),a(),f(e.items());}}function oe(i,n){if(i&1&&(p(0,"div",12),R(1),d()),i&2){let e=r().$implicit;a(),L(" ",e.description," ");}}function ae(i,n){if(i&1){let e=S();p(0,"div",8)(1,"input",9),y("ngModelChange",function(o){s(e);let l=r(2);return F(l.value,o)||(l.value=o),u(o);}),v("ngModelChange",function(){s(e);let o=r(2);return u(o.update());}),d(),p(2,"label",10),E(3,1),d(),m(4,oe,2,1,"div",11),d();}if(i&2){let e=n.$implicit,t=r(2);a(),c("name",t.inputId())("id",t.getRadioId(e))("value",e.id),x("ngModel",t.value),a(),c("for",t.getRadioId(e)),a(),b(e.label),M(3),a(),c("ngIf",e.description);}}function re(i,n){if(i&1&&C(0,ae,5,7,"div",8,K),i&2){let e=r();f(e.items());}}var ge=(()=>{let n=class n{items=_.required();inputId=_.required();label=_();isGroup=_(!1,{transform:T});labelSecondary=_(!1,{transform:T});screenService=h(J);value=O("");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();}};g(n,"\u0275fac",function(o){return new(o||n)();}),g(n,"\u0275cmp",A({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:[$([{provide:j,useExisting:I(()=>n),multi:!0}])],ngContentSelectors:Q,decls:5,vars:2,consts:()=>{let t;t="\n          "+"\uFFFD0\uFFFD"+"\n        ";let o;return o="\n          "+"\uFFFD0\uFFFD"+"\n        ",[t,o,["role","radiogroup"],[3,"for","ngClass",4,"ngIf"],["role","group",3,"ngClass"],[3,"for","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"],["class","form-group-description",4,"ngIf"],[1,"form-group-description"]];},template:function(o,l){o&1&&(P(),p(0,"div",2),m(1,te,2,5,"label",3),N(2),m(3,ne,3,4,"div",4)(4,re,2,0),d()),o&2&&(a(),c("ngIf",l.label()),a(2),D(l.isGroup()?3:4));},dependencies:[Z,z,U,q,B,X,k,W],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-SC5DOVZ7.css.map */`]}));let i=n;return i;})();export{ge as a};/**i18n:42345378061bf3c93df67acfa161b751a7b03cc91f3ede7c1f1cdf2bba62fe26*///# sourceMappingURL=chunk-E5XVMKDC.js.map