import{jsxs as e,jsx as l}from"react/jsx-runtime";import{createClass as a}from"@gem-sdk/system";import{SubscriptionRadio as s}from"./SubscriptionRadio.js";import{getSellingPlanRadioContainerClasses as i,getSellingPlanRadioLabelClasses as m,getSellingPlanRadioOptionsClasses as n,getSellingPlanRadioOptionTextClasses as r}from"../common/classes.js";import{getSellingPlanRadioOptionsStyles as o}from"../common/styles.js";let t=({setting:t,styles:c,productId:p,sellingPlanOptions:d,builderProps:u,selectedValue:g,onChange:v})=>{let{sellingLabel:$}=t??{},{uid:h}=u??{},y=a(i()),f=a(m()),j=a(n()),N=a(r()),b=o({sellingPlanItemGap:c?.sellingPlanItemGap,sellingType:t?.sellingType});return e("div",{className:y,style:b,children:[$&&l("label",{className:f,children:$}),l("div",{className:j,style:b,children:d.map(e=>l(s,{id:`${p}-${e.value}-${h??""}`,name:`${p}-selling-plan-options-${h??""}`,value:e.value,checked:g===e.value,onChange:e=>v(e.target.value),children:l("span",{className:N,children:e.label})},`${p}-${e.value}-${h??""}`))})]})};export{t as SellingPlanRadio};
