import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import VoucherCard from "../voucher/index.js";
import React from "react";
import { Modal } from "antd";
import "./index.less";
//#region src/components/booking/components/voucherModal/index.tsx
const VoucherModal = ({ visible, onClose, state, dispatch, source }) => {
	var _state$service, _state$addons, _state$client;
	return /* @__PURE__ */ React.createElement(Modal, {
		title: null,
		open: visible,
		onCancel: onClose,
		footer: null,
		width: 600,
		className: `pisell-voucher-modal ${!visible ? "pisell-voucher-modal--hidden" : ""}`,
		forceRender: true
	}, /* @__PURE__ */ React.createElement("div", { className: "pisell-voucher-modal-content" }, /* @__PURE__ */ React.createElement(VoucherCard, {
		state: _objectSpread2(_objectSpread2({}, state), {}, {
			service: _objectSpread2(_objectSpread2({}, state.service || {}), {}, { value: ((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [] }),
			addons: _objectSpread2(_objectSpread2({}, state.addons || {}), {}, { value: ((_state$addons = state.addons) === null || _state$addons === void 0 ? void 0 : _state$addons.value) || [] }),
			client: _objectSpread2(_objectSpread2({}, state.client || {}), {}, { value: ((_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value) || {} })
		}),
		dispatch,
		source,
		isInModal: true
	})));
};
//#endregion
export { VoucherModal as default };
