const require_runtime = require("../../_virtual/_rolldown/runtime.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");
require("./PisellPercent.less");
//#region src/components/pisellPercent/PisellPercent.tsx
/**
* PisellPercent 百分比组件
* 
* 基于 PisellNumber 派生，专门处理百分比数据。
* 支持文本、进度条、环形进度三种展示变体。
* 
* @param props 组件 Props
* 
* @example
* // 基础使用
* const [value, setValue] = useState(85.5);
* <PisellPercent 
*   value={value}
*   onChange={setValue}
* />
* 
* @example
* // 进度条展示
* <PisellPercent 
*   mode="read"
*   value={75}
*   variant="progress"
* />
* 
* @example
* // 滑块 + 输入框
* <PisellPercent 
*   value={value}
*   onChange={setValue}
*   showSlider
* />
*/
const PisellPercent = (props) => {
	const { mode = "edit", disabled = false } = props;
	switch ((0, _pisell_utils.getDisplayState)(mode, disabled)) {
		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 MemoizedPisellPercent = react.default.memo(PisellPercent, (prevProps, nextProps) => {
	return prevProps.value === nextProps.value && prevProps.mode === nextProps.mode && prevProps.disabled === nextProps.disabled && prevProps.variant === nextProps.variant;
});
//#endregion
exports.default = MemoizedPisellPercent;
