const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_objectWithoutProperties = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
//#region src/components/pisellSingleSelect/components/DisabledView.tsx
/**
* PisellSingleSelect - DisabledView (禁用态视图)
* 禁用状态下的渲染
*/
const _excluded = [
	"value",
	"options",
	"label",
	"required",
	"placeholder",
	"size",
	"className",
	"style"
];
const DisabledView = (0, react.forwardRef)((props, ref) => {
	const { value, options, label, required, placeholder = "请选择", size = "middle", className, style } = props, restProps = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
	const antdOptions = (0, react.useMemo)(() => options.map((opt) => ({
		label: opt.label,
		value: opt.value,
		disabled: opt.disabled
	})), [options]);
	return /* @__PURE__ */ react.default.createElement("div", {
		className: (0, classnames.default)("pisell-single-select-wrapper", className),
		style
	}, label && /* @__PURE__ */ react.default.createElement("label", { className: (0, classnames.default)("pisell-single-select-label", { "pisell-single-select-label-required": required }) }, label), /* @__PURE__ */ react.default.createElement(antd.Select, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, restProps), {}, {
		ref,
		value: value !== null && value !== void 0 ? value : void 0,
		options: antdOptions,
		placeholder,
		disabled: true,
		size,
		className: "pisell-single-select"
	})));
});
DisabledView.displayName = "PisellSingleSelectDisabledView";
//#endregion
exports.default = DisabledView;
