"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectGroup = void 0;
const react_1 = __importDefault(require("react"));
const SelectGroup = ({ setValue, options, label, id, layout, }) => {
    return (react_1.default.createElement("span", { className: layout === "stacked"
            ? "on-select-wrapper stacked"
            : "on-select-wrapper" },
        label && react_1.default.createElement("label", { htmlFor: id }, label),
        react_1.default.createElement("select", { className: "on-select", onChange: (e) => setValue(e.target.value), id: id }, options.map((item, index) => (react_1.default.createElement("option", { key: index, label: item.label, value: item.value }))))));
};
exports.SelectGroup = SelectGroup;
