const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_objectSpread2 = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
const require_ReadOnlyView = require("./ReadOnlyView.js");
const require_EditView = require("./EditView.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/components/pisellLongText/components/DisabledView.tsx
/**
* PisellLongText 禁用态视图组件
* 
* 负责渲染禁用态视图，基于原始 mode 渲染对应的视图，并添加禁用样式
* 
* 设计规则：
* - 基于编辑态或只读态的视觉
* - 透明度 40%
* - 禁止所有交互行为
* 
* @param props 组件 Props
*/
const DisabledView = (props) => {
	const { mode = "edit" } = props;
	const disabledStyle = require_objectSpread2._objectSpread2({
		opacity: .4,
		pointerEvents: "none",
		cursor: "not-allowed"
	}, props.style);
	if (mode === "read") return /* @__PURE__ */ react.default.createElement("div", {
		className: "pisell-long-text-disabled",
		style: disabledStyle
	}, /* @__PURE__ */ react.default.createElement(require_ReadOnlyView.default, props));
	return /* @__PURE__ */ react.default.createElement("div", {
		className: "pisell-long-text-disabled",
		style: disabledStyle
	}, /* @__PURE__ */ react.default.createElement(require_EditView.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, props), {}, { disabled: true })));
};
//#endregion
exports.default = DisabledView;
