import { PREFIX } from "../../status.js";
import React, { useState } from "react";
import { locales } from "@pisell/utils";
import { Icon } from "@pisell/materials";
import "./index.less";
//#region src/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.tsx
const CardMoreText = (props) => {
	const { className, onChange } = props;
	const [isFold, setIsFold] = useState(false);
	const handleClick = () => {
		setIsFold(!isFold);
		onChange(!isFold);
	};
	return /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__card-more-text-wrap ${className}` }, /* @__PURE__ */ React.createElement("div", {
		className: `${PREFIX}__card-more-text-wrap-content`,
		onClick: handleClick
	}, /* @__PURE__ */ React.createElement("span", null, isFold ? locales.getText("pisell2.sku-card.view-more") : locales.getText("pisell2.sku-card.view-less")), /* @__PURE__ */ React.createElement(Icon, {
		type: "DoubleLeftOutlined",
		className: `${PREFIX}__card-more-text-wrap-content-icon  ${isFold ? "is-unfold" : "is-fold"}`
	})));
};
//#endregion
export { CardMoreText as default };
