import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _objectWithoutProperties } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import useResponsive from "../../hooks/useResponsive.js";
import React, { useMemo } from "react";
import { Typography } from "antd";
//#region src/components/typography/index.tsx
const _excluded = [
	"pcIsEllipsis",
	"padIsEllipsis",
	"mobileIsEllipsis",
	"ellipsis"
], _excluded2 = [
	"pcIsEllipsis",
	"padIsEllipsis",
	"mobileIsEllipsis",
	"ellipsis"
];
const { Paragraph: AntParagraph, Title: AntTitle } = Typography;
const Paragraph = (props) => {
	const { pcIsEllipsis, padIsEllipsis, mobileIsEllipsis, ellipsis } = props, others = _objectWithoutProperties(props, _excluded);
	const responsive = useResponsive();
	const ellipsisObj = useMemo(() => {
		if (pcIsEllipsis && responsive === "pc") return { ellipsis };
		if (padIsEllipsis && responsive === "ipad") return { ellipsis };
		if (mobileIsEllipsis && responsive === "phone") return { ellipsis };
		return {};
	}, [
		pcIsEllipsis,
		padIsEllipsis,
		mobileIsEllipsis,
		ellipsis,
		responsive
	]);
	return /* @__PURE__ */ React.createElement(AntParagraph, _objectSpread2(_objectSpread2({}, others), ellipsisObj));
};
const Title = (props) => {
	const { pcIsEllipsis, padIsEllipsis, mobileIsEllipsis, ellipsis } = props, others = _objectWithoutProperties(props, _excluded2);
	const responsive = useResponsive();
	const ellipsisObj = useMemo(() => {
		if (pcIsEllipsis && responsive === "pc") return { ellipsis };
		if (padIsEllipsis && responsive === "ipad") return { ellipsis };
		if (mobileIsEllipsis && responsive === "phone") return { ellipsis };
		return {};
	}, [
		pcIsEllipsis,
		padIsEllipsis,
		mobileIsEllipsis,
		ellipsis,
		responsive
	]);
	return /* @__PURE__ */ React.createElement(AntTitle, _objectSpread2(_objectSpread2({}, others), ellipsisObj));
};
const Typography$1 = Typography;
Typography$1.Paragraph = Paragraph;
Typography$1.Title = Title;
//#endregion
export { Typography$1 as default };
