const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_pisell_components = require("../../theme/pisell-components.js");
const require_ReadOnlyView = require("./components/ReadOnlyView.js");
const require_EditView = require("./components/EditView.js");
const require_DisabledView = require("./components/DisabledView.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_utils = require("@pisell/utils");
let antd = require("antd");
require("./PisellLongText.less");
//#region src/components/pisellLongText/PisellLongText.tsx
/**
* PisellLongText 长文本/多行文本组件
* 
* 多行文本输入/展示组件，支持只读、编辑、禁用三种状态。
* 基于 Ant Design TextArea 组件开发，提供展开/折叠功能和完整的校验框架。
* 
* @param props 组件 Props
* 
* @example
* // 编辑态
* <PisellLongText 
*   placeholder="请输入内容"
*   rows={3}
*   maxLength={500}
*   showCount
* />
* 
* @example
* // 只读态（展开折叠）
* <PisellLongText 
*   mode="read"
*   value={longText}
*   maxLines={3}
*   enableExpand
* />
* 
* @example
* // 自动高度
* <PisellLongText 
*   autoSize={{ minRows: 3, maxRows: 10 }}
*   placeholder="自动调整高度"
* />
*/
const PisellLongText = (props) => {
	const { mode = "edit", disabled = false } = props;
	const displayState = (0, _pisell_utils.getDisplayState)(mode, disabled);
	const render = () => {
		switch (displayState) {
			case "read": return /* @__PURE__ */ react.default.createElement(require_ReadOnlyView.default, props);
			case "edit": return /* @__PURE__ */ react.default.createElement(require_EditView.default, props);
			case "disabled": return /* @__PURE__ */ react.default.createElement(require_DisabledView.default, props);
			default: return null;
		}
	};
	const theme = require_pisell_components.getPisellComponentsThemeConfig();
	return /* @__PURE__ */ react.default.createElement(antd.ConfigProvider, { theme }, render());
};
var PisellLongText_default = react.default.memo(PisellLongText, (prevProps, nextProps) => {
	return prevProps.value === nextProps.value && prevProps.mode === nextProps.mode && prevProps.disabled === nextProps.disabled;
});
//#endregion
exports.default = PisellLongText_default;
