import{$b as u,Bb as l,Bc as c,Cb as a,Da as m,Ib as r,Kb as M,Lb as C,Qa as n,Yb as y,Zb as s,_b as d,ab as h,eb as v,md as b,vb as g,vc as _,wb as f}from"./chunk-RGCH6K7F.js";import"./chunk-W7GRJBO5.js";var D=(i,p)=>p.value;function P(i,p){if(i&1&&(l(0,"option",2),d(1),a()),i&2){let t=p.$implicit,o=C();r("value",t.value),n(),u(o.resolvePrimitive(t.label))}}var x=(()=>{class i extends b{options=c.required();value=c.required();description=c.required();selectId=super.getUniqueId("a2ui-multiple-choice");selectValue=_(()=>super.resolvePrimitive(this.value()));handleChange(t){let o=this.value()?.path;!(t.target instanceof HTMLSelectElement)||!t.target.value||!o||this.processor.setData(this.component(),this.processor.resolvePath(o,this.component().dataContextPath),t.target.value)}static \u0275fac=(()=>{let t;return function(e){return(t||(t=m(i)))(e||i)}})();static \u0275cmp=h({type:i,selectors:[["a2ui-multiple-choice"]],inputs:{options:[1,"options"],value:[1,"value"],description:[1,"description"]},features:[v],decls:6,vars:12,consts:[[3,"for"],[3,"change","id","value"],[3,"value"]],template:function(o,e){o&1&&(l(0,"section")(1,"label",0),d(2),a(),l(3,"select",1),M("change",function(E){return e.handleChange(E)}),g(4,P,2,2,"option",2,D),a()()),o&2&&(s(e.theme.components.MultipleChoice.container),n(),s(e.theme.components.MultipleChoice.label),r("htmlFor",e.selectId),n(),u(e.description()),n(),y(e.theme.additionalStyles==null?null:e.theme.additionalStyles.MultipleChoice),s(e.theme.components.MultipleChoice.element),r("id",e.selectId)("value",e.selectValue()),n(),f(e.options()))},styles:["[_nghost-%COMP%]{display:block;flex:var(--weight);min-height:0;overflow:auto}select[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}"]})}return i})();export{x as MultipleChoice};
