import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import React, { useMemo } from "react";
import classNames from "classnames";
import "./index.less";
//#region src/components/booking/components/browserSelect/index.tsx
const _excluded = ["options"];
/**
* @title: 系统级别的下拉框
* @description:
* @param {BrowserSelectProps} props
* @return {*}
* @Author: zhiwei.Wang
* @Date: 2024-01-30 16:43
*/
const BrowserSelect = (props) => {
	const { options } = props, resetProps = _objectWithoutProperties(props, _excluded);
	const _options = useMemo(() => {
		return (props.options || []).map((d) => {
			return /* @__PURE__ */ React.createElement("option", {
				value: d.value,
				key: d.value
			}, d.label);
		});
	}, [props.options]);
	return /* @__PURE__ */ React.createElement("select", _objectSpread2(_objectSpread2({}, resetProps), {}, {
		className: classNames("pisell-browser-select", resetProps.className),
		onChange: (e) => {
			var _resetProps$onChange;
			e.persist();
			(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 || _resetProps$onChange.call(resetProps, e);
		}
	}), _options);
};
//#endregion
export { BrowserSelect as default };
