import{C as U,a as X,c as j,g as z,n as q,q as B}from"./chunk-Y4WF5HJS.js";import{$a as g,Aa as a,Bb as r,Cb as w,Db as N,Dc as H,Fc as h,Ka as I,Oc as k,Qb as x,Rb as P,Sb as V,Wb as F,X as A,Xb as y,Ya as O,Yb as T,Zc as W,_a as m,aa as D,cb as f,cc as L,db as S,di as K,eb as _,ec as $,fa as p,fb as c,fc as G,ga as u,gb as d,rb as b,vb as M,wb as E,xb as v,yc as s,zb as R}from"./chunk-R4Z6ZI3L.js";import{i as C}from"./chunk-P6NJDXIL.js";var Z=["*"],J=n=>({"label-secondary":n}),Y=(n,i)=>({"btn-group":n,"btn-group-vertical":i}),Q=(n,i)=>i.id;function ee(n,i){if(n&1&&(c(0,"label",3),x(1),d()),n&2){let e=r();_("for",e.inputId())("ngClass",$(3,J,e.labelSecondary())),a(),P(e.label());}}function te(n,i){if(n&1){let e=b();c(0,"input",5),T("ngModelChange",function(o){p(e);let l=r(2);return y(l.value,o)||(l.value=o),u(o);}),R("ngModelChange",function(){p(e);let o=r(2);return u(o.update());}),d(),c(1,"label",6),M(2,0),d();}if(n&2){let e=i.$implicit,t=r(2);_("name",t.inputId())("id",t.getRadioId(e))("value",e.id),F("ngModel",t.value),a(),_("for",t.getRadioId(e)),O("data-label",e.label),a(),E(e.label),v(2);}}function ne(n,i){if(n&1&&(c(0,"div",4),f(1,te,3,7,null,null,Q),d()),n&2){let e=r();_("ngClass",G(1,Y,!e.isInMobileView(),e.isInMobileView())),a(),S(e.items());}}function ie(n,i){if(n&1&&(c(0,"div",10),x(1),d()),n&2){let e=r().$implicit;a(),V(" ",e.description," ");}}function oe(n,i){if(n&1){let e=b();c(0,"div",7)(1,"input",8),T("ngModelChange",function(o){p(e);let l=r(2);return y(l.value,o)||(l.value=o),u(o);}),R("ngModelChange",function(){p(e);let o=r(2);return u(o.update());}),d(),c(2,"label",9),M(3,1),d(),m(4,ie,2,1,"div",10),d();}if(n&2){let e=i.$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(),g(e.description?4:-1);}}function ae(n,i){if(n&1&&f(0,oe,5,7,"div",7,Q),n&2){let e=r();S(e.items());}}var me=(()=>{let i=class i{items=s.required();inputId=s.required();label=s();isGroup=s(!1,{transform:h});labelSecondary=s(!1,{transform:h});screenService=D(K);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(i,"\u0275fac",function(o){return new(o||i)();}),C(i,"\u0275cmp",I({type:i,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:A(()=>i),multi:!0}])],ngContentSelectors:Z,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),m(1,ee,2,5,"label",3),N(2),m(3,ne,3,4,"div",4)(4,ae,2,0),d()),o&2&&(a(),g(l.label()?1:-1),a(2),g(l.isGroup()?3:4));},dependencies:[U,j,B,z,q,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-ZQX6KH6X.css.map */`]}));let n=i;return n;})();export{me as a};/**i18n:138e9aba5923606215625ab5641fbdc103d8a34cfe13ae910386f40f27aea675*///# sourceMappingURL=chunk-ONZ54AJT.js.map