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 n,getSellingPlanRadioOptionsClasses as m,getSellingPlanRadioOptionTextClasses as o}from"../common/classes.js";import{getSellingPlanRadioOptionsStyles as r}from"../common/styles.js";let SellingPlanRadio=({setting:t,styles:c,productId:p,sellingPlanOptions:d,builderProps:g,selectedValue:u,onChange:v})=>{let{sellingLabel:$}=t??{},{uid:h}=g??{},y=a(i()),f=a(n()),j=a(m()),N=a(o()),P=r({sellingPlanItemGap:c?.sellingPlanItemGap,sellingType:t?.sellingType});return e("div",{className:y,style:P,children:[$&&l("label",{className:f,children:$}),l("div",{className:j,style:P,children:d.map(e=>l(s,{id:`${p}-${e.value}-${h??""}`,name:`${p}-selling-plan-options-${h??""}`,value:e.value,checked:u===e.value,onChange:e=>v(e.target.value),children:l("span",{className:N,children:e.label})},`${p}-${e.value}-${h??""}`))})]})};export{SellingPlanRadio};
