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, { forwardRef, useMemo } from "react";
import { Select } from "antd";
import classNames from "classnames";
//#region src/components/pisellMultipleSelect/components/DisabledView.tsx
/**
* PisellMultipleSelect - DisabledView (禁用态视图)
* 禁用状态下的渲染
*/
const _excluded = [
	"value",
	"options",
	"label",
	"required",
	"placeholder",
	"size",
	"className",
	"style"
];
const DisabledView = forwardRef((props, ref) => {
	const { value = [], options, label, required, placeholder = "请选择", size = "middle", className, style } = props, restProps = _objectWithoutProperties(props, _excluded);
	const antdOptions = useMemo(() => options.map((opt) => ({
		label: opt.label,
		value: opt.value,
		disabled: opt.disabled
	})), [options]);
	return /* @__PURE__ */ React.createElement("div", {
		className: classNames("pisell-multiple-select-wrapper", className),
		style
	}, label && /* @__PURE__ */ React.createElement("label", { className: classNames("pisell-multiple-select-label", { "pisell-multiple-select-label-required": required }) }, label), /* @__PURE__ */ React.createElement(Select, _objectSpread2(_objectSpread2({}, restProps), {}, {
		ref,
		mode: "multiple",
		value,
		options: antdOptions,
		placeholder,
		disabled: true,
		size,
		className: "pisell-multiple-select"
	})));
});
DisabledView.displayName = "PisellMultipleSelectDisabledView";
//#endregion
export { DisabledView as default };
