"use client";
import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs";
import { factory } from "../../core/factory/factory.mjs";
import { InputBase } from "../InputBase/InputBase.mjs";
import { getParsedComboboxData } from "../Combobox/get-parsed-combobox-data/get-parsed-combobox-data.mjs";
import { ComboboxChevron } from "../Combobox/ComboboxChevron/ComboboxChevron.mjs";
import { NativeSelectOption } from "./NativeSelectOption.mjs";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/NativeSelect/NativeSelect.tsx
const defaultProps = {
	size: "sm",
	rightSectionPointerEvents: "none"
};
const NativeSelect = factory((props) => {
	const { data, children, size, error, rightSection, unstyled, ...others } = useProps([
		"Input",
		"InputWrapper",
		"NativeSelect"
	], defaultProps, props);
	const options = getParsedComboboxData(data).map((item, index) => /* @__PURE__ */ jsx(NativeSelectOption, { data: item }, index));
	return /* @__PURE__ */ jsx(InputBase, {
		component: "select",
		...others,
		__staticSelector: "NativeSelect",
		size,
		pointer: true,
		error,
		unstyled,
		rightSection: rightSection || /* @__PURE__ */ jsx(ComboboxChevron, {
			size,
			error,
			unstyled
		}),
		children: children || options
	});
});
NativeSelect.classes = InputBase.classes;
NativeSelect.displayName = "@mantine/core/NativeSelect";
//#endregion
export { NativeSelect };

//# sourceMappingURL=NativeSelect.mjs.map