import { globalConfig } from "../../../pisell-config-provider/context.js";
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import classNames from "classnames";
import "./index.less";
//#region src/components/pisellModal/components/functions/index.tsx
let Modal;
const setModal = (m) => {
	Modal = m;
};
const genConfig = (props) => {
	const { platform } = globalConfig.getConfig();
	return _objectSpread2(_objectSpread2({}, props), {}, {
		wrapClassName: classNames("pisell-modal-function-wrap", { ["pisell-modal-mobile-function-wrap"]: platform === "h5" }),
		transitionName: "pisell-move-down",
		cancelButtonProps: _objectSpread2({
			block: true,
			size: "large"
		}, props.cancelButtonProps || {}),
		okButtonProps: _objectSpread2({
			block: true,
			size: "large"
		}, props.okButtonProps || {}),
		icon: null
	});
};
const info = (props) => {
	return Modal.info(genConfig(props));
};
const success = (props) => {
	return Modal.success(genConfig(props));
};
const error = (props) => {
	return Modal.error(genConfig(props));
};
const warning = (props) => {
	return Modal.warning(genConfig(props));
};
const warn = (props) => {
	return Modal.warn(genConfig(props));
};
const confirm = (props) => {
	return Modal.confirm(genConfig(props));
};
//#endregion
export { confirm, error, info, setModal, success, warn, warning };
