'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("@gem-sdk/system"),t=require("./common/styles.js"),r=require("./common/classes.js"),o=require("../../hooks/useGetColorContent.js");exports.default=({builderProps:l,builderAttrs:a,setting:n,advanced:c,children:i,styles:d})=>{let{name:u,childItem:m,required:p}=n??{},{handleOnChange:y,getTextColor:C}=o.useGetColorContent(n),j=s.createStyle(t.composeContainerStyles(c,n)),h=s.createStyle({...t.composeFormDropdownStyles(c,n,d),...C}),x=s.createStyle(t.getStyleOption(n)),f=s.createClass(r.composeContainerClasses(c,l)),q=s.createClass(r.composeFormDropdownClasses(n));return e.jsxs("div",{...a,"data-id":l?.uid,className:f,style:j,children:[e.jsxs("select",{className:q,style:h,required:p,name:u,onChange:y,children:[s.If(!Number(n?.defaultOption),e.jsx("option",{className:"gp-hidden",value:"",disabled:!0,selected:!0,children:n?.placeholder})),m?.map((s,t)=>e.jsx("option",{value:s,style:x,...!!Number(n?.defaultOption)&&{selected:s===m[Number(n?.defaultOption)-1]},children:s},t))]}),i]})};
