import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
import { isDayBooking, isEventBooking } from "../service2/utils.js";
import { isWalkIn } from "../../utils.js";
import { Context } from "../model.js";
import useGetHolderList from "../hooks/useGetHolderList.js";
import useEngineContext from "../../../../hooks/useEngineContext.js";
import useAddHolder, { useFormDataConfig } from "../hooks/useAddHolder.js";
import { changeFormValues, sortFormValues } from "../../forms/format.js";
import { formatDate as formatDate$1 } from "../../../../utils/date.js";
import Forms from "../../forms/forms.js";
import ChangePetModal_default from "./ChangePetModal/index.js";
import dayjs from "dayjs";
import React, { useContext, useEffect, useMemo, useRef, useState } from "react";
import { Avatar, Button, Skeleton, Tag } from "antd";
import { locales } from "@pisell/utils";
import User01 from "@pisell/icon/es/User01";
import { useMemoizedFn } from "ahooks";
import "./index.less";
//#region src/components/booking/info/pet/index.tsx
const defaultParams = {
	skip: 1,
	num: 20,
	total: 0,
	keyword: ""
};
const Pet = (props) => {
	var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$client$value, _state$client10, _state$pet10, _state$client12;
	const { hideTitle, addButtonProps, handleOpenModal, clientChangeNotSetPet, previewItemTitleRender } = props;
	const [loadLoading, setLoadLoading] = useState(false);
	const [loading, setLoading] = useState(false);
	let { state, dispatch } = useContext(Context);
	const [valueLoading, setValueLoading] = useState(false);
	const { isTerminal } = ((_context$appHelper = useEngineContext().appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
	const [params, setParams] = useState(defaultParams);
	const changePetRef = useRef(null);
	state = state || (props === null || props === void 0 ? void 0 : props.state);
	dispatch = dispatch || (props === null || props === void 0 ? void 0 : props.dispatch);
	const { waiverForm } = useAddHolder(state, dispatch);
	const { isMinorAndWaiver } = useFormDataConfig(state);
	const getHolders = useGetHolderList(state, dispatch);
	console.log("waiver", props, state);
	const boardParams = useMemo(() => {
		var _state$bookingConfig;
		return (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.appointment_subject) || {};
	}, [state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.basic) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.appointment_subject]);
	/**
	* @title: 预约主体
	* @description:
	* @param {*} useMemo
	* @return {*}
	* @Author: zhiwei.Wang
	* @Date: 2024-01-27 14:22
	*/
	const petForm = useMemo(() => {
		var _state$bookingConfig3, _holder$form, _holder$form2;
		let _holder = (_state$bookingConfig3 = state.bookingConfig) === null || _state$bookingConfig3 === void 0 ? void 0 : _state$bookingConfig3.holder;
		if (!_holder) return null;
		return _objectSpread2(_objectSpread2(_objectSpread2({}, _holder), _holder === null || _holder === void 0 ? void 0 : _holder.form), {}, {
			options: [],
			form_id: _holder === null || _holder === void 0 || (_holder$form = _holder.form) === null || _holder$form === void 0 ? void 0 : _holder$form.id,
			field: _holder === null || _holder === void 0 || (_holder$form2 = _holder.form) === null || _holder$form2 === void 0 ? void 0 : _holder$form2.form_field,
			relation_type: "appointment_booking",
			form_record: []
		});
	}, [(_state$bookingConfig4 = state.bookingConfig) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.holder]);
	/**
	* @title: 获取表单数据
	* @description:
	* @param {any} param1
	* @return {*}
	* @Author: zhiwei.Wang
	* @Date: 2024-01-27 14:22
	*/
	const getFormData = function() {
		var _ref = _asyncToGenerator(function* ({ formData }, _params = defaultParams) {
			var _state$client;
			setLoading(true);
			let _list = [];
			if (!(formData.data_range === "customer" && isWalkIn((_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id))) {
				let _values = _objectSpread2(_objectSpread2({ form_id: boardParams.form_id }, _params), {}, { source_shop_customer: petForm === null || petForm === void 0 ? void 0 : petForm.is_franchisor });
				if (formData.data_range === "customer") {
					var _state$client2;
					_values.customer_id = (_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id;
				}
				const data = yield state.apis.getPetsData(_values);
				_list = [...formData.options];
				if (_params.skip === 1) _list = (data === null || data === void 0 ? void 0 : data.list) || [];
				else ((data === null || data === void 0 ? void 0 : data.list) || []).forEach((item) => {
					const index = _list.findIndex((old) => old.id === item.id);
					if (index > -1) _list[index] = item;
					else _list.push(item);
				});
				setParams(_objectSpread2(_objectSpread2(_objectSpread2({}, params), _params), {}, { total: (data === null || data === void 0 ? void 0 : data.count) || 0 }));
			} else setParams((o) => _objectSpread2(_objectSpread2({}, o), {}, { total: 0 }));
			dispatch({
				type: "setPet",
				payload: {
					formData: [_objectSpread2(_objectSpread2({}, formData), {}, { options: _list })],
					pets: _list
				}
			});
			setLoading(false);
		});
		return function getFormData(_x) {
			return _ref.apply(this, arguments);
		};
	}();
	const setPetOptions = (options) => {
		var _state$pet, _state$client3, _state$pet2, _state$pet3;
		if (((_state$pet = state.pet) === null || _state$pet === void 0 || (_state$pet = _state$pet.formData) === null || _state$pet === void 0 ? void 0 : _state$pet[0].data_range) === "customer" && isWalkIn((_state$client3 = state.client) === null || _state$client3 === void 0 || (_state$client3 = _state$client3.value) === null || _state$client3 === void 0 ? void 0 : _state$client3.id)) return;
		dispatch({
			type: "setPet",
			payload: {
				formData: [_objectSpread2(_objectSpread2({}, (_state$pet2 = state.pet) === null || _state$pet2 === void 0 || (_state$pet2 = _state$pet2.formData) === null || _state$pet2 === void 0 ? void 0 : _state$pet2[0]), {}, { options })],
				pets: options,
				holders: [options[0], ...(_state$pet3 = state.pet) === null || _state$pet3 === void 0 ? void 0 : _state$pet3.holders]
			}
		});
	};
	/**
	* @title: 获取预约主体表单
	* @description:
	* @return {*}
	* @Author: zhiwei.Wang
	* @Date: 2024-01-27 14:20
	*/
	const getForms = function() {
		var _ref2 = _asyncToGenerator(function* (isUpdateValue = true) {
			let values = _objectSpread2({}, state.pet.value);
			let recordIds = [];
			if (isEventBooking(state)) {
				var _state$bookingDetail;
				recordIds = (_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.bookings.list.reduce((acc, cur) => {
					return Array.from(new Set([...acc, ...cur.holder.form_record]));
				}, []);
			} else {
				var _state$bookingDetail2;
				recordIds = ((_state$bookingDetail2 = state.bookingDetail) === null || _state$bookingDetail2 === void 0 || (_state$bookingDetail2 = _state$bookingDetail2.holder) === null || _state$bookingDetail2 === void 0 ? void 0 : _state$bookingDetail2.form_record) || [];
			}
			let isSetValue = isUpdateValue && values[boardParams === null || boardParams === void 0 ? void 0 : boardParams.form_id] === void 0 && (recordIds === null || recordIds === void 0 ? void 0 : recordIds.length);
			if (isSetValue) setValueLoading(true);
			try {
				let formData = petForm;
				if (state.renderType === "eventBooking") {
					var _state$bookingDetail3;
					formData = yield state.apis.getForms({
						relation_type: "event_booking_v2",
						relation_id: ((_state$bookingDetail3 = state.bookingDetail) === null || _state$bookingDetail3 === void 0 || (_state$bookingDetail3 = _state$bookingDetail3.bookings) === null || _state$bookingDetail3 === void 0 ? void 0 : _state$bookingDetail3.id) || 0
					});
					formData = (formData || []).filter((d) => d.form_id === (boardParams === null || boardParams === void 0 ? void 0 : boardParams.form_id))[0];
					formData = _objectSpread2(_objectSpread2(_objectSpread2({}, formData), formData.form), {}, {
						form_id: formData.form.id,
						options: [],
						type: formData.type
					});
				}
				let payload = { formData: [formData] };
				if (isSetValue) {
					var _state$client4;
					let records = yield state.apis.getFormRecords({
						form_record_ids: recordIds,
						with: ["customer"]
					});
					console.log("records", records);
					values[boardParams === null || boardParams === void 0 ? void 0 : boardParams.form_id] = sortFormValues(records, (_state$client4 = state.client) === null || _state$client4 === void 0 || (_state$client4 = _state$client4.value) === null || _state$client4 === void 0 ? void 0 : _state$client4.id);
					payload.value = values;
					setValueLoading(false);
				}
				dispatch({
					type: "setPet",
					payload
				});
			} catch (err) {
				setValueLoading(false);
				setLoading(false);
				console.log("form_error", err);
			}
		});
		return function getForms() {
			return _ref2.apply(this, arguments);
		};
	}();
	const updateResult = (res, item) => {
		var _state$pet4;
		let cur = [...state.pet.value[petForm.form_id] || []];
		let options = ((_state$pet4 = state.pet) === null || _state$pet4 === void 0 || (_state$pet4 = _state$pet4.formData) === null || _state$pet4 === void 0 || (_state$pet4 = _state$pet4[0]) === null || _state$pet4 === void 0 ? void 0 : _state$pet4.options) || [];
		if (res.type === "delete") {
			const isDay = isDayBooking(state);
			if (isDay && state.disabledEdit) return cur;
			cur = cur.filter((d) => d.form_record_id !== item.form_record_id);
			addCallback();
			if (isDay) handleDayChange(item);
		} else {
			let obj = {
				customer: item === null || item === void 0 ? void 0 : item.customer,
				form_id: petForm === null || petForm === void 0 ? void 0 : petForm.form_id
			};
			for (let item of res) obj[item.key] = item.value;
			cur = cur.map((d) => d.form_record_id === item.form_record_id ? obj : d);
			options = options.map((d) => {
				if (d.form_record_id === item.form_record_id) return obj;
				return d;
			});
		}
		onValueChange({
			values: { [petForm.form_id]: cur },
			options
		});
	};
	const handleViewItem = useMemoizedFn((item) => {
		var _state$client5;
		let _data = {
			formDataConfig: _objectSpread2({}, petForm),
			record: item
		};
		if (petForm.data_range === "customer" && !isWalkIn((_state$client5 = state.client) === null || _state$client5 === void 0 || (_state$client5 = _state$client5.value) === null || _state$client5 === void 0 ? void 0 : _state$client5.id)) {
			var _state$client6;
			_data.customerId = (_state$client6 = state.client) === null || _state$client6 === void 0 || (_state$client6 = _state$client6.value) === null || _state$client6 === void 0 ? void 0 : _state$client6.id;
		}
		state.action({
			type: "pisell1.goCustomFormDetail",
			data: _data,
			callback: (res) => {
				updateResult(res, item);
			}
		});
	});
	const handleEditItem = useMemoizedFn((item) => {
		var _state$client7;
		let _data = {
			formDataConfig: _objectSpread2({}, petForm),
			record: item
		};
		if (petForm.data_range === "customer" && !isWalkIn((_state$client7 = state.client) === null || _state$client7 === void 0 || (_state$client7 = _state$client7.value) === null || _state$client7 === void 0 ? void 0 : _state$client7.id)) {
			var _state$client8;
			_data.customerId = (_state$client8 = state.client) === null || _state$client8 === void 0 || (_state$client8 = _state$client8.value) === null || _state$client8 === void 0 ? void 0 : _state$client8.id;
		}
		state.action({
			type: "pisell1.editCustomFormRecord",
			data: _data,
			callback: (res) => {
				console.log(res, "ressss");
				updateResult(res, item);
			}
		});
	});
	/**
	* @title: 修改数据
	* @description:
	* @param {any} param1
	* @return {*}
	* @Author: zhiwei.Wang
	* @Date: 2024-01-27 14:16
	*/
	const onValueChange = useMemoizedFn(({ values, edit = true, options }) => {
		const updateObj = {};
		if (options) {
			var _state$pet5;
			updateObj.formData = [_objectSpread2(_objectSpread2({}, (_state$pet5 = state.pet) === null || _state$pet5 === void 0 || (_state$pet5 = _state$pet5.formData) === null || _state$pet5 === void 0 ? void 0 : _state$pet5[0]), {}, { options })];
			updateObj.pets = options;
		}
		dispatch({
			type: "setPet",
			payload: _objectSpread2({
				edit,
				value: values
			}, updateObj)
		});
	});
	useEffect(() => {
		var _state$pet6, _state$client9, _state$pet7;
		if (clientChangeNotSetPet) return;
		let changeFormValuesData = changeFormValues({
			values: ((_state$pet6 = state.pet) === null || _state$pet6 === void 0 ? void 0 : _state$pet6.value) || {},
			clientId: (_state$client9 = state.client) === null || _state$client9 === void 0 || (_state$client9 = _state$client9.value) === null || _state$client9 === void 0 ? void 0 : _state$client9.id,
			forms: ((_state$pet7 = state.pet) === null || _state$pet7 === void 0 ? void 0 : _state$pet7.formData) || []
		});
		setTimeout(() => {
			dispatch({
				type: "setPet",
				payload: { value: changeFormValuesData }
			});
		});
	}, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, clientChangeNotSetPet]);
	const handleUpdateForm = () => {
		if (state.bookingId) {
			if (!state.bookingDetail) return;
		}
		if (boardParams.form_id && boardParams.type === "form") getForms(true);
	};
	useEffect(() => {
		setTimeout(() => {
			handleUpdateForm();
		}, 10);
	}, [
		state.bookingId,
		state.bookingDetail,
		boardParams.form_id,
		boardParams.type,
		state.renderType,
		petForm,
		clientChangeNotSetPet ? (_state$client10 = state.client) === null || _state$client10 === void 0 || (_state$client10 = _state$client10.value) === null || _state$client10 === void 0 ? void 0 : _state$client10.id : void 0
	]);
	const addCallback = useMemoizedFn((_params) => {
		var _state$pet8;
		getFormData({ formData: (_state$pet8 = state.pet) === null || _state$pet8 === void 0 || (_state$pet8 = _state$pet8.formData) === null || _state$pet8 === void 0 ? void 0 : _state$pet8[0] }, _params || params);
	});
	const searchChange = useMemoizedFn((keyword) => {
		addCallback(_objectSpread2(_objectSpread2({}, params), {}, {
			skip: 1,
			keyword
		}));
	});
	const loadMore = useMemo(() => {
		var _state$pet9;
		return ((_state$pet9 = state.pet) === null || _state$pet9 === void 0 || (_state$pet9 = _state$pet9.formData) === null || _state$pet9 === void 0 || (_state$pet9 = _state$pet9[0]) === null || _state$pet9 === void 0 || (_state$pet9 = _state$pet9.options) === null || _state$pet9 === void 0 ? void 0 : _state$pet9.length) < params.total || 0 ? /* @__PURE__ */ React.createElement("div", {
			className: "",
			style: {
				textAlign: "center",
				padding: "16px 0"
			}
		}, /* @__PURE__ */ React.createElement(Button, {
			loading: loadLoading,
			onClick: () => {
				addCallback(_objectSpread2(_objectSpread2({}, params), {}, { skip: params.skip + 1 }));
			}
		}, locales.getText("pisell2.text.load-more"))) : null;
	}, [
		loadLoading,
		params,
		(_state$pet10 = state.pet) === null || _state$pet10 === void 0 || (_state$pet10 = _state$pet10.formData) === null || _state$pet10 === void 0 || (_state$pet10 = _state$pet10[0]) === null || _state$pet10 === void 0 || (_state$pet10 = _state$pet10.options) === null || _state$pet10 === void 0 ? void 0 : _state$pet10.length
	]);
	const handleDayChange = (e) => {
		var _state$service$value;
		const id = e === null || e === void 0 ? void 0 : e.form_record_id;
		const service = (_state$service$value = state.service.value) === null || _state$service$value === void 0 ? void 0 : _state$service$value.filter((item) => item._extend.holder_id === id);
		if (id && (service === null || service === void 0 ? void 0 : service.length)) {
			var _state$service;
			changePetRef === null || changePetRef === void 0 || changePetRef.current.open({
				ids: [id],
				dispatch,
				service: ((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || []
			});
		}
	};
	/**
	* @title: 跨日预约其他自定义方法
	* @description:
	* @param {*} useMemo
	* @return {*}
	* @Author: WangHan
	* @Date: 2024-12-12 22:30
	*/
	const dayCustomSelect = useMemo(() => {
		if (isDayBooking(state)) return { handleDayChange };
		return {};
	}, [state.renderType, state.service.value]);
	const ignoreValidity = useMemo(() => {
		var _petForm$setting;
		return !(petForm === null || petForm === void 0 || (_petForm$setting = petForm.setting) === null || _petForm$setting === void 0 ? void 0 : _petForm$setting.validity) || petForm.setting.validity.type === "no_expiry";
	}, [petForm]);
	const getExpireStatus = (expiredAt) => {
		if (ignoreValidity || !expiredAt) return null;
		const now = dayjs();
		const expireDate = dayjs(expiredAt).endOf("day");
		const diffDays = expireDate.diff(now, "day");
		const formattedDate = formatDate$1(expireDate, "YYYY-MM-DD", "DD/MM/YYYY");
		if (now.isAfter(expireDate)) return /* @__PURE__ */ React.createElement("div", { style: {
			color: "#999999",
			fontSize: "14px",
			lineHeight: "20px"
		} }, /* @__PURE__ */ React.createElement(Tag, {
			color: "red",
			style: {
				borderRadius: 16,
				marginRight: 8
			}
		}, locales.getText("pisell2.text.status.expired")), locales.getText("pisell2.text.validity.expired")(formattedDate));
		if (diffDays < 7) return /* @__PURE__ */ React.createElement("div", { style: {
			color: "#FFA940",
			fontSize: "14px",
			lineHeight: "20px"
		} }, locales.getText("pisell2.text.validity.expiring_soon")(formattedDate));
		return /* @__PURE__ */ React.createElement("div", { style: {
			color: "#999999",
			fontSize: "14px",
			lineHeight: "20px"
		} }, locales.getText("pisell2.text.validity.valid_through")(formattedDate));
	};
	return useMemo(() => {
		var _petForm$setting2, _state$client11;
		let canEdit = true;
		if (petForm === null || petForm === void 0 || (_petForm$setting2 = petForm.setting) === null || _petForm$setting2 === void 0 ? void 0 : _petForm$setting2.permissions) {
			var _petForm$setting3;
			const { staff = [] } = (petForm === null || petForm === void 0 || (_petForm$setting3 = petForm.setting) === null || _petForm$setting3 === void 0 ? void 0 : _petForm$setting3.permissions) || {};
			canEdit = staff.includes("edit");
		}
		return /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__booking-pet-wraps" }, /* @__PURE__ */ React.createElement(Skeleton, {
			loading: valueLoading,
			active: true,
			round: true
		}, /* @__PURE__ */ React.createElement(Forms, {
			isMinorAndWaiver,
			waiverForm,
			hideTitle,
			watch: { value: state.pet.value },
			addCallback: (formDataConfig, data) => {
				var _state$pet11;
				setPetOptions([_objectSpread2(_objectSpread2({}, data), {}, { form_id: formDataConfig === null || formDataConfig === void 0 ? void 0 : formDataConfig.form_id }), ...((_state$pet11 = state.pet) === null || _state$pet11 === void 0 || (_state$pet11 = _state$pet11.formData) === null || _state$pet11 === void 0 || (_state$pet11 = _state$pet11[0]) === null || _state$pet11 === void 0 ? void 0 : _state$pet11.options) || []]);
			},
			drawerProps: { mask: state.drawerMask },
			getHolders,
			addCallbackService: addCallback,
			loading: valueLoading,
			forms: state.pet.formData,
			action: state.action,
			modalOpen: state.modalOpen,
			value: state.pet.value,
			onChange: onValueChange,
			client: (_state$client11 = state.client) === null || _state$client11 === void 0 ? void 0 : _state$client11.value,
			customSelectProps: _objectSpread2({
				loading,
				handleViewItem,
				virtualListHeight: window.innerHeight - 213 - 57 - 16,
				disabled: state.disabledEdit,
				autoFocus: !state.isTerminal,
				closeCallback: () => {
					searchChange("");
				},
				showDropDown: !state.disableEventBookingEdit,
				searchChange,
				searchValue: params.search,
				loadMore,
				filterItem: () => {
					return true;
				},
				handleOpenModal,
				previewItemTitleRender
			}, dayCustomSelect),
			optionRender: (item) => {
				console.log("waiver", petForm, item);
				return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Avatar, {
					className: "pisell-lowcode__booking-pet-list-item-avatar",
					src: item.cover,
					icon: /* @__PURE__ */ React.createElement(User01, { className: "pisell-lowcode__booking-pet-list-item-avatar-icon" })
				}), /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__booking-pet-list-item-info" }, /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__booking-pet-list-item-info-name" }, item.main_field), /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__booking-pet-list-item-info-desc" }, /* @__PURE__ */ React.createElement("div", { className: "" }, item.key_age)), /* @__PURE__ */ React.createElement("div", null, getExpireStatus(item.expired_at))), /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__booking-pet-list-item-actions" }, /* @__PURE__ */ React.createElement("div", {
					className: "pisell-lowcode__booking-pet-list-item-actions-view",
					onClick: (e) => {
						e.preventDefault();
						e.stopPropagation();
						handleViewItem(item);
					}
				}, locales.getText("pisell2.text.view")), canEdit ? /* @__PURE__ */ React.createElement("div", {
					className: "pisell-lowcode__booking-pet-list-item-actions-edit",
					onClick: (e) => {
						e.preventDefault();
						e.stopPropagation();
						handleEditItem(item);
					}
				}, locales.getText("pisell2.text.edit")) : null));
			},
			addButtonProps: _objectSpread2({
				style: { margin: 0 },
				disabled: state.disableEventBookingEdit,
				showDisabledMessage: !state.disableEventBookingEdit,
				addCallback: function() {
					var _ref3 = _asyncToGenerator(function* () {
						addCallback();
					});
					return function addCallback() {
						return _ref3.apply(this, arguments);
					};
				}()
			}, addButtonProps)
		})), /* @__PURE__ */ React.createElement(ChangePetModal_default, { ref: changePetRef }));
	}, [
		valueLoading,
		hideTitle,
		state.pet.value,
		state.pet.formData,
		state.action,
		state.modalOpen,
		state.pet.value,
		(_state$client12 = state.client) === null || _state$client12 === void 0 ? void 0 : _state$client12.value,
		loading,
		state.disabledEdit,
		state.isTerminal,
		state.disableEventBookingEdit,
		params.search,
		loadMore,
		addButtonProps,
		state.isBookingCreatePage,
		isMinorAndWaiver,
		waiverForm,
		petForm
	]);
};
//#endregion
export { Pet as default };
