import{jsx as e,jsxs as l}from"react/jsx-runtime";import{createClass as a}from"@gem-sdk/system";import{getSellingPlanDropdownContainerClasses as s,getSellingPlanDropdownLabelClasses as r,getSellingPlanDropdownLabelSpanClasses as n,getSellingPlanDropdownLabelInnerSpanClasses as i,getSellingPlanDropdownSelectClasses as t,getSellingPlanDropdownOptionClasses as o,getSellingPlanDropdownIconContainerClasses as c,getSellingPlanDropdownIconClasses as m}from"../common/classes.js";let SellingPlanDropdown=({setting:d,sellingPlanOptions:p,selectedValue:h,dir:v,onChange:g})=>{let{sellingLabel:u}=d??{},N="rtl"===v,f=a(s()),w=a(r(N)),b=a(n()),x=a(i()),S=a(t({isNoLabel:""===u,isRTL:N})),j=a(o()),C=a(c(N)),D=a(m());return e("div",{dir:v,className:f,children:l("div",{className:"gp-relative",children:[u&&e("label",{htmlFor:"selling-plan-select",className:w,children:e("span",{className:b,children:e("span",{className:x,children:u})})}),e("select",{autoComplete:"off",name:"Select Option",className:S,value:h,onChange:e=>g(e.target.value),children:p.map(l=>e("option",{className:j,value:l.value,children:l.label},l.value))}),e("div",{className:C,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",focusable:"false","aria-hidden":"true",role:"presentation",className:D,children:e("path",{d:"M0 5h20L10 15"})})})]})})};export{SellingPlanDropdown};
