1import{R as j,j as r}from"./main-react-CZ43MNZ9.js";import{L as n}from"./index-XdM5tw8C.js";import{a as v}from"./index-DwFGaSi4.js";import{F as R}from"./index-Dts_OsCg.js";import"./preload-helper-Cdv6RdwI.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./try-parse-json-PNnY1j55.js";import"./index-DdlCi1f1.js";import"./index-mLFX9G4A.js";const u=j.forwardRef(({options:e,mandatory:t,value:l,name:m,onChange:s,onBlur:c,className:a,hideEmptyOption:d=!1,id:f},o)=>r.jsxs("select",{id:f||m,value:l,name:m,onChange:i=>{s==null||s(i)},onBlur:c,ref:o,required:t,className:a,children:[!d&&r.jsx("option",{value:""}),e==null?void 0:e.map((i,p)=>r.jsx("option",{value:i.value,children:i.caption},p))]}));u.displayName="SelectPrimitive";const S=j.forwardRef(({label:e,required:t,preValues:l,description:m,descriptionAbove:s,error:c,errorMessage:a,onChange:d,onBlur:f,name:o,value:i,hideEmptyOption:p=!1,id:x,...F},h)=>{if(!l)throw new Error("preValues is required for Select");return r.jsxs("div",{className:"form-field",children:[e&&r.jsx(n,{required:t,htmlFor:x||o,children:e}),r.jsx(R,{description:m,descriptionAbove:s,children:r.jsx(u,{...F,options:l,ref:h,mandatory:!!t,onChange:d,onBlur:f,value:i,name:o,id:x,className:"form-field__select",hideEmptyOption:p})}),c&&a&&r.jsx(v,{children:a})]})});S.displayName="Select";export{S as Select,S as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.