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