import { Form } from "../utilities/form/Form.mjs";
import { Field } from "../utilities/form/Field.mjs";
import { UdpEnums } from "../enums/unitySystemEnums.mjs";
import { useHandleAxiosSnackbar } from "../utilities/apiHelpers.mjs";
import { useUser } from "../utilities/auth/useUser.mjs";
import { FluentTextFieldAutoComplete } from "../UI/inputs/textField/FluentTextFieldAutoComplete.mjs";
import { useShellStore } from "../stores/shellStore.mjs";
import { useActionState } from "../hooks/useActions.mjs";
import { getSearchObject } from "../utilities/search/SearchUtilities.mjs";
import { constructBusinessObjectArrFromTree } from "../utilities/tree/TreeUtilities.mjs";
import { LayoutUnit } from "../layout/LayoutUnit.mjs";
import { executeQueryAdHoc, executeQueryWithParameters, getBaseMethod } from "../udp/utilities/methodUtils.mjs";
import { AmbientCard } from "../UI/surfaces/cards/AmbientCard/AmbientCard.mjs";
import { CkRichEditor } from "../UI/inputs/richEditors/CkRichEditor.mjs";
import { ShortcutContentFinder } from "../udp/ShortcutContent/ShortcutContentFinder.mjs";
import { c } from "react-compiler-runtime";
import React, { useEffect, useRef, useState } from "react";
import { LinearProgress, TextField, makeStyles } from "@material-ui/core";
import { useTranslation } from "react-i18next";
import { differenceWith } from "lodash-es";
//#region src/notes/NotesScreen.jsx
const useStyles = makeStyles((theme) => ({
	root: {},
	editor: { "& .ck-editor__main > .ck-editor__editable_inline": { backgroundColor: theme?.getThemeData()?.mode === "dark" ? theme.palette.grey[800] : theme.palette.grey[100] } },
	row: {
		display: "flex",
		justifyContent: "space-between"
	},
	input: {
		height: 34,
		padding: 0
	},
	formTextInput: { fontSize: 14 },
	labelRoot: { fontSize: 14 }
}));
const NotesScreen = (props) => {
	const $ = c(138);
	const { formRef, onSubmit, shortcutContentFinderEnabled, id, viewOnly, reloadNotes } = props;
	const [note, setNote] = useState("");
	let t0;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t0 = [];
		$[0] = t0;
	} else t0 = $[0];
	const [typeOptions, setTypeOptions] = useState(t0);
	let t1;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = [];
		$[1] = t1;
	} else t1 = $[1];
	const [templateOptions, setTemplateOptions] = useState(t1);
	const [noteId, setNoteId] = useState(id || "");
	let t2;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = [];
		$[2] = t2;
	} else t2 = $[2];
	const [existingNoteFiledFor, setExistingNoteFiledFor] = useState(t2);
	const [existingNoteObj, setExistingNoteObj] = useState(null);
	const [loading, setLoading] = useState(false);
	const classes = useStyles(props);
	const { t } = useTranslation();
	const actionState = useActionState();
	const shellHidden = useShellStore(_temp);
	const { menuListState, catalogPromotedEntities } = actionState;
	const { handleSuccessSnackbar, handleErrorSnackbar } = useHandleAxiosSnackbar();
	const user = useUser();
	const editorRef = useRef(null);
	let t3;
	bb0: {
		if (menuListState.menuList.length) {
			t3 = menuListState.menuList[menuListState.selectedMenuIndex] || null;
			break bb0;
		}
		t3 = null;
	}
	const selectedMenu = t3;
	let t4;
	if ($[3] !== catalogPromotedEntities) {
		t4 = getBaseMethod(UdpEnums.Udp_Note, "unityBaseGetFullMethod", catalogPromotedEntities);
		$[3] = catalogPromotedEntities;
		$[4] = t4;
	} else t4 = $[4];
	const noteGetFullApiMethod = t4;
	let t5;
	if ($[5] !== catalogPromotedEntities) {
		t5 = getBaseMethod(UdpEnums.Udp_Note_Type, "unityBaseSearchMethod", catalogPromotedEntities);
		$[5] = catalogPromotedEntities;
		$[6] = t5;
	} else t5 = $[6];
	const noteTypeSearchApiMethod = t5;
	let t6;
	if ($[7] !== catalogPromotedEntities) {
		t6 = getBaseMethod(UdpEnums.Udp_Note_Template, "unityBaseSearchMethod", catalogPromotedEntities);
		$[7] = catalogPromotedEntities;
		$[8] = t6;
	} else t6 = $[8];
	const noteTemplateSearchApiMethod = t6;
	let t7;
	if ($[9] !== catalogPromotedEntities) {
		t7 = getBaseMethod(UdpEnums.Udp_Note, "unityBaseCreateMethod", catalogPromotedEntities);
		$[9] = catalogPromotedEntities;
		$[10] = t7;
	} else t7 = $[10];
	const createNoteApiMethod = t7;
	let t8;
	if ($[11] !== catalogPromotedEntities) {
		t8 = getBaseMethod(UdpEnums.Udp_Note, "unityBaseUpdateMethod", catalogPromotedEntities);
		$[11] = catalogPromotedEntities;
		$[12] = t8;
	} else t8 = $[12];
	const updateNoteApiMethod = t8;
	let t9;
	if ($[13] !== catalogPromotedEntities) {
		t9 = getBaseMethod(UdpEnums.Udp_Note_Filed_For, "unityBaseCreateMethod", catalogPromotedEntities);
		$[13] = catalogPromotedEntities;
		$[14] = t9;
	} else t9 = $[14];
	const createNoteFiledForApiMethod = t9;
	let t10;
	if ($[15] !== catalogPromotedEntities) {
		t10 = getBaseMethod(UdpEnums.Udp_Note_Filed_For, "unityBaseDeleteMethod", catalogPromotedEntities);
		$[15] = catalogPromotedEntities;
		$[16] = t10;
	} else t10 = $[16];
	const deleteNoteFiledForApiMethod = t10;
	const disabled = viewOnly;
	let t11;
	if ($[17] !== createNoteApiMethod || $[18] !== handleErrorSnackbar || $[19] !== handleSuccessSnackbar || $[20] !== noteId || $[21] !== reloadNotes || $[22] !== updateNoteApiMethod || $[23] !== user?.currentTenantId || $[24] !== user?.familyName || $[25] !== user?.firstName || $[26] !== user?.id) {
		t11 = async (values) => {
			let response = null;
			const data = { requestBody: {
				tenantId: user?.currentTenantId,
				typeCode: values?.type?.code,
				subject: values?.subject,
				content: values?.note,
				unityUserId: user?.id,
				userDisplayName: `${user?.firstName} ${user?.familyName}`
			} };
			if (noteId) if (updateNoteApiMethod) {
				data["{iD}"] = noteId;
				response = await executeQueryWithParameters({ data }, updateNoteApiMethod.apiMethodId).catch((e) => handleErrorSnackbar(e, "Could not Update Note"));
			} else handleErrorSnackbar(null, "Update Note Method Not Promoted");
			else if (createNoteApiMethod) response = await executeQueryWithParameters({ data }, createNoteApiMethod.apiMethodId).catch((e_0) => handleErrorSnackbar(e_0, "Could not Save Note"));
			else handleErrorSnackbar(null, "Create Note Method Not Promoted");
			if (response?.status === 200) {
				if (!noteId) {
					setNoteId(response.data.id || "");
					handleSuccessSnackbar("Note Saved");
				} else handleSuccessSnackbar("Note Updated");
				if (reloadNotes) reloadNotes();
				return response.data.id || noteId;
			}
			return noteId;
		};
		$[17] = createNoteApiMethod;
		$[18] = handleErrorSnackbar;
		$[19] = handleSuccessSnackbar;
		$[20] = noteId;
		$[21] = reloadNotes;
		$[22] = updateNoteApiMethod;
		$[23] = user?.currentTenantId;
		$[24] = user?.familyName;
		$[25] = user?.firstName;
		$[26] = user?.id;
		$[27] = t11;
	} else t11 = $[27];
	const handleSaveNote = t11;
	const noteFiledForToComparator = _temp2;
	let t12;
	if ($[28] !== createNoteFiledForApiMethod || $[29] !== deleteNoteFiledForApiMethod || $[30] !== existingNoteFiledFor || $[31] !== handleErrorSnackbar) {
		t12 = async (values_0, notedIdToFileFor) => {
			const noteFiledForToDelete = differenceWith(existingNoteFiledFor, values_0?.fileTo, noteFiledForToComparator);
			const noteFiledForToCreate = differenceWith(values_0?.fileTo, existingNoteFiledFor, noteFiledForToComparator);
			if (notedIdToFileFor) {
				if (deleteNoteFiledForApiMethod) {
					const deletedPromises = [];
					noteFiledForToDelete.forEach((nftd) => {
						const data_0 = {};
						data_0["{noteID}"] = notedIdToFileFor;
						data_0["{entityBusinessKey}"] = nftd.value;
						deletedPromises.push(executeQueryWithParameters({ data: data_0 }, deleteNoteFiledForApiMethod.apiMethodId));
					});
					await Promise.all(deletedPromises.map(_temp4)).then((responses) => {
						if (responses.length !== deletedPromises.length) console.warn("Not all Note Filed For deleted");
					});
				} else handleErrorSnackbar(null, "Delete Note Filed For Method Not Promoted");
				if (createNoteFiledForApiMethod) {
					const createdPromises = [];
					noteFiledForToCreate.forEach((nftc) => {
						const data_1 = { requestBody: {
							noteId: notedIdToFileFor,
							entityBusinessKey: nftc.value
						} };
						createdPromises.push(executeQueryWithParameters({ data: data_1 }, createNoteFiledForApiMethod.apiMethodId));
					});
					await Promise.all(createdPromises.map(_temp6)).then((responses_0) => {
						responses_0.forEach((response_0) => {
							if (response_0.status === 200) {
								const entityBusinessKey = response_0.data.entityBusinessKey;
								if (!noteFiledForToCreate.find((nftc_0) => nftc_0.value === entityBusinessKey)) console.warn("Note Filed For not created for all file to entities");
							}
						});
					});
					setExistingNoteFiledFor(values_0?.fileTo);
				} else handleErrorSnackbar(null, "Create Note Filed For Method Not Promoted");
			}
		};
		$[28] = createNoteFiledForApiMethod;
		$[29] = deleteNoteFiledForApiMethod;
		$[30] = existingNoteFiledFor;
		$[31] = handleErrorSnackbar;
		$[32] = t12;
	} else t12 = $[32];
	const handleNoteFiledFor = t12;
	let t13;
	if ($[33] !== handleNoteFiledFor || $[34] !== handleSaveNote || $[35] !== note || $[36] !== onSubmit) {
		t13 = async (values_1) => {
			if (onSubmit) onSubmit({
				note,
				...values_1
			});
			else {
				const notedIdToFileFor_0 = await handleSaveNote({
					note,
					...values_1
				});
				await handleNoteFiledFor({
					note,
					...values_1
				}, notedIdToFileFor_0);
			}
		};
		$[33] = handleNoteFiledFor;
		$[34] = handleSaveNote;
		$[35] = note;
		$[36] = onSubmit;
		$[37] = t13;
	} else t13 = $[37];
	const handleOnSubmit = t13;
	let t14;
	if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
		t14 = (note_0) => {
			setNote(note_0);
		};
		$[38] = t14;
	} else t14 = $[38];
	const handleTextEditorChange = t14;
	let t15;
	if ($[39] !== formRef || $[40] !== typeOptions) {
		t15 = (value) => {
			formRef?.current?.form?.change("subject", value?.subject || "");
			const type = typeOptions.find((option) => option.code === value.typeCode);
			formRef?.current?.form?.change("type", type || null);
			setNote(value?.content || "");
		};
		$[39] = formRef;
		$[40] = typeOptions;
		$[41] = t15;
	} else t15 = $[41];
	const onTemplateChange = t15;
	let t16;
	if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
		t16 = (shortcutContent) => {
			editorRef?.current?.model?.change((writer) => {
				const insertPosition = editorRef?.current?.model?.document?.selection?.getFirstPosition();
				writer.remove(editorRef?.current?.model?.document?.selection?.getFirstRange());
				writer.insertText(shortcutContent, insertPosition);
			});
			setNote(editorRef?.current?.getData());
		};
		$[42] = t16;
	} else t16 = $[42];
	const handleShortcutOnSelect = t16;
	let t17;
	if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
		t17 = [];
		$[43] = t17;
	} else t17 = $[43];
	let options = t17;
	if (selectedMenu) {
		let t18;
		if ($[44] !== selectedMenu) {
			t18 = constructBusinessObjectArrFromTree(selectedMenu);
			$[44] = selectedMenu;
			$[45] = t18;
		} else t18 = $[45];
		options = t18;
	}
	const fileToOptions = options;
	let t18;
	if ($[46] !== noteTypeSearchApiMethod) {
		t18 = () => {
			const getTypeOptions = async () => {
				let options_0 = [];
				if (noteTypeSearchApiMethod) {
					const typesResponse = await executeQueryAdHoc({ data: getSearchObject([], 1, 200, true) }, noteTypeSearchApiMethod.apiMethodId);
					if (typesResponse?.status === 200) options_0 = typesResponse.data?.pageList;
				}
				setTypeOptions(options_0);
			};
			getTypeOptions();
		};
		$[46] = noteTypeSearchApiMethod;
		$[47] = t18;
	} else t18 = $[47];
	let t19;
	if ($[48] !== noteTypeSearchApiMethod || $[49] !== user) {
		t19 = [
			noteTypeSearchApiMethod,
			setTypeOptions,
			user
		];
		$[48] = noteTypeSearchApiMethod;
		$[49] = user;
		$[50] = t19;
	} else t19 = $[50];
	useEffect(t18, t19);
	let t20;
	if ($[51] !== noteTemplateSearchApiMethod) {
		t20 = () => {
			const getTemplateOptions = async () => {
				let options_1 = [];
				if (noteTemplateSearchApiMethod) {
					const templatesResponse = await executeQueryAdHoc({ data: getSearchObject([], 1, 200, true) }, noteTemplateSearchApiMethod.apiMethodId);
					if (templatesResponse?.status === 200) options_1 = templatesResponse.data?.pageList;
				}
				setTemplateOptions(options_1);
			};
			getTemplateOptions();
		};
		$[51] = noteTemplateSearchApiMethod;
		$[52] = t20;
	} else t20 = $[52];
	let t21;
	if ($[53] !== noteTemplateSearchApiMethod || $[54] !== user) {
		t21 = [
			noteTemplateSearchApiMethod,
			setTemplateOptions,
			user
		];
		$[53] = noteTemplateSearchApiMethod;
		$[54] = user;
		$[55] = t21;
	} else t21 = $[55];
	useEffect(t20, t21);
	let t22;
	let t23;
	if ($[56] !== id || $[57] !== noteGetFullApiMethod) {
		t22 = () => {
			const getExistingNote = async () => {
				let existingNoteObj_0 = null;
				const data_4 = {};
				if (noteGetFullApiMethod) {
					setLoading(true);
					data_4["{iD}"] = id;
					const noteResponse = await executeQueryWithParameters({ data: data_4 }, noteGetFullApiMethod.apiMethodId).catch((e_3) => {
						console.error(e_3);
						setLoading(false);
					});
					if (noteResponse?.status === 200) existingNoteObj_0 = noteResponse.data;
				}
				setExistingNoteObj(existingNoteObj_0);
				setNote(existingNoteObj_0?.content);
				setLoading(false);
			};
			if (id) getExistingNote();
		};
		t23 = [id, noteGetFullApiMethod];
		$[56] = id;
		$[57] = noteGetFullApiMethod;
		$[58] = t22;
		$[59] = t23;
	} else {
		t22 = $[58];
		t23 = $[59];
	}
	useEffect(t22, t23);
	let t24;
	let t25;
	if ($[60] !== existingNoteObj || $[61] !== fileToOptions || $[62] !== formRef) {
		t24 = () => {
			if (!existingNoteObj || !fileToOptions?.length) return;
			const initialFileTos = fileToOptions.filter((option_0) => existingNoteObj.noteFiledFor.find((nff) => option_0.value === nff.entityBusinessKey));
			setExistingNoteFiledFor(initialFileTos);
			formRef?.current?.form?.change("fileTo", initialFileTos);
		};
		t25 = [
			existingNoteObj,
			fileToOptions,
			formRef
		];
		$[60] = existingNoteObj;
		$[61] = fileToOptions;
		$[62] = formRef;
		$[63] = t24;
		$[64] = t25;
	} else {
		t24 = $[63];
		t25 = $[64];
	}
	useEffect(t24, t25);
	let t26;
	let t27;
	if ($[65] !== existingNoteObj || $[66] !== formRef || $[67] !== typeOptions) {
		t26 = () => {
			if (!existingNoteObj || !typeOptions?.length) return;
			const initialType = typeOptions.find((option_1) => option_1.code === existingNoteObj.typeCode);
			formRef?.current?.form?.change("type", initialType || null);
		};
		t27 = [
			existingNoteObj,
			typeOptions,
			formRef
		];
		$[65] = existingNoteObj;
		$[66] = formRef;
		$[67] = typeOptions;
		$[68] = t26;
		$[69] = t27;
	} else {
		t26 = $[68];
		t27 = $[69];
	}
	useEffect(t26, t27);
	let t28;
	let t29;
	if ($[70] !== existingNoteObj || $[71] !== formRef) {
		t28 = () => {
			if (!existingNoteObj) return;
			formRef?.current?.form?.change("subject", existingNoteObj?.subject || "");
		};
		t29 = [existingNoteObj, formRef];
		$[70] = existingNoteObj;
		$[71] = formRef;
		$[72] = t28;
		$[73] = t29;
	} else {
		t28 = $[72];
		t29 = $[73];
	}
	useEffect(t28, t29);
	const t30 = classes.root;
	let t31;
	if ($[74] !== loading) {
		t31 = loading && /* @__PURE__ */ React.createElement(LinearProgress, { color: "secondary" });
		$[74] = loading;
		$[75] = t31;
	} else t31 = $[75];
	let t32;
	if ($[76] !== t) {
		t32 = t("File To");
		$[76] = t;
		$[77] = t32;
	} else t32 = $[77];
	let t33;
	if ($[78] !== fileToOptions) {
		t33 = fileToOptions || [];
		$[78] = fileToOptions;
		$[79] = t33;
	} else t33 = $[79];
	const t34 = !viewOnly ? 2 : -1;
	let t35;
	if ($[80] !== disabled || $[81] !== t32 || $[82] !== t33 || $[83] !== t34) {
		t35 = /* @__PURE__ */ React.createElement(Field, {
			component: FluentTextFieldAutoComplete,
			label: t32,
			name: "fileTo",
			id: "fileTo",
			fullWidth: true,
			variant: "outlined",
			margin: "dense",
			size: "small",
			options: t33,
			optionKey: "label",
			required: true,
			limitTags: t34,
			isMultiple: true,
			disabled
		});
		$[80] = disabled;
		$[81] = t32;
		$[82] = t33;
		$[83] = t34;
		$[84] = t35;
	} else t35 = $[84];
	const t36 = classes.row;
	let t37;
	if ($[85] === Symbol.for("react.memo_cache_sentinel")) {
		t37 = { width: "100%" };
		$[85] = t37;
	} else t37 = $[85];
	let t38;
	if ($[86] !== t) {
		t38 = t("Type");
		$[86] = t;
		$[87] = t38;
	} else t38 = $[87];
	let t39;
	if ($[88] !== typeOptions) {
		t39 = typeOptions || [];
		$[88] = typeOptions;
		$[89] = t39;
	} else t39 = $[89];
	let t40;
	if ($[90] !== disabled || $[91] !== t38 || $[92] !== t39) {
		t40 = /* @__PURE__ */ React.createElement("div", { style: t37 }, /* @__PURE__ */ React.createElement(Field, {
			component: FluentTextFieldAutoComplete,
			label: t38,
			name: "type",
			id: "type",
			fullWidth: true,
			variant: "outlined",
			margin: "dense",
			size: "small",
			options: t39,
			optionKey: "name",
			required: true,
			disabled
		}));
		$[90] = disabled;
		$[91] = t38;
		$[92] = t39;
		$[93] = t40;
	} else t40 = $[93];
	let t41;
	if ($[94] !== onTemplateChange || $[95] !== t || $[96] !== templateOptions || $[97] !== viewOnly) {
		t41 = !viewOnly && /* @__PURE__ */ React.createElement("div", { style: {
			width: "100%",
			marginLeft: 8
		} }, /* @__PURE__ */ React.createElement(Field, {
			component: FluentTextFieldAutoComplete,
			label: t("Template"),
			name: "template",
			id: "template",
			fullWidth: true,
			variant: "outlined",
			margin: "dense",
			size: "small",
			options: templateOptions || [],
			optionKey: "name",
			additionalOnChangeAction: onTemplateChange
		}));
		$[94] = onTemplateChange;
		$[95] = t;
		$[96] = templateOptions;
		$[97] = viewOnly;
		$[98] = t41;
	} else t41 = $[98];
	let t42;
	if ($[99] !== classes.row || $[100] !== t40 || $[101] !== t41) {
		t42 = /* @__PURE__ */ React.createElement("div", { className: t36 }, t40, t41);
		$[99] = classes.row;
		$[100] = t40;
		$[101] = t41;
		$[102] = t42;
	} else t42 = $[102];
	let t43;
	if ($[103] !== t) {
		t43 = t("Subject");
		$[103] = t;
		$[104] = t43;
	} else t43 = $[104];
	const t44 = classes?.input;
	const t45 = classes?.formTextInput;
	let t46;
	if ($[105] !== t44 || $[106] !== t45) {
		t46 = { classes: {
			root: t44,
			input: t45
		} };
		$[105] = t44;
		$[106] = t45;
		$[107] = t46;
	} else t46 = $[107];
	const t47 = classes?.labelRoot;
	let t48;
	if ($[108] !== t47) {
		t48 = { classes: { root: t47 } };
		$[108] = t47;
		$[109] = t48;
	} else t48 = $[109];
	let t49;
	if ($[110] !== disabled || $[111] !== t43 || $[112] !== t46 || $[113] !== t48) {
		t49 = /* @__PURE__ */ React.createElement(Field, {
			component: TextField,
			label: t43,
			name: "subject",
			id: "subject",
			fullWidth: true,
			variant: "outlined",
			size: "small",
			margin: "dense",
			required: true,
			disabled,
			InputProps: t46,
			InputLabelProps: t48
		});
		$[110] = disabled;
		$[111] = t43;
		$[112] = t46;
		$[113] = t48;
		$[114] = t49;
	} else t49 = $[114];
	let t50;
	if ($[115] === Symbol.for("react.memo_cache_sentinel")) {
		t50 = /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "nudge" });
		$[115] = t50;
	} else t50 = $[115];
	let t51;
	if ($[116] !== classes.editor) {
		t51 = { editor: classes.editor };
		$[116] = classes.editor;
		$[117] = t51;
	} else t51 = $[117];
	let t52;
	if ($[118] !== disabled || $[119] !== note || $[120] !== t51) {
		t52 = /* @__PURE__ */ React.createElement(CkRichEditor, {
			handleChange: handleTextEditorChange,
			classes: t51,
			data: note,
			editorRef,
			isUsingRef: true,
			readOnly: disabled
		});
		$[118] = disabled;
		$[119] = note;
		$[120] = t51;
		$[121] = t52;
	} else t52 = $[121];
	let t53;
	if ($[122] !== formRef || $[123] !== handleOnSubmit || $[124] !== t35 || $[125] !== t42 || $[126] !== t49 || $[127] !== t52) {
		t53 = /* @__PURE__ */ React.createElement(AmbientCard, {
			fullWidth: true,
			header: true
		}, /* @__PURE__ */ React.createElement(Form, {
			onSubmit: handleOnSubmit,
			ref: formRef
		}, t35, t42, t49, t50, t52));
		$[122] = formRef;
		$[123] = handleOnSubmit;
		$[124] = t35;
		$[125] = t42;
		$[126] = t49;
		$[127] = t52;
		$[128] = t53;
	} else t53 = $[128];
	let t54;
	if ($[129] === Symbol.for("react.memo_cache_sentinel")) {
		t54 = /* @__PURE__ */ React.createElement(LayoutUnit, { unit: "nudge" });
		$[129] = t54;
	} else t54 = $[129];
	let t55;
	if ($[130] !== shellHidden || $[131] !== shortcutContentFinderEnabled) {
		t55 = shortcutContentFinderEnabled && /* @__PURE__ */ React.createElement(AmbientCard, {
			fullWidth: true,
			header: true,
			lastChildBottomPadding: "0px",
			cardContentHeight: `calc(100vh - ${shellHidden ? "568px" : "623px"})`
		}, /* @__PURE__ */ React.createElement(ShortcutContentFinder, { onSelect: handleShortcutOnSelect }));
		$[130] = shellHidden;
		$[131] = shortcutContentFinderEnabled;
		$[132] = t55;
	} else t55 = $[132];
	let t56;
	if ($[133] !== classes.root || $[134] !== t31 || $[135] !== t53 || $[136] !== t55) {
		t56 = /* @__PURE__ */ React.createElement("div", { className: t30 }, t31, t53, t54, t55);
		$[133] = classes.root;
		$[134] = t31;
		$[135] = t53;
		$[136] = t55;
		$[137] = t56;
	} else t56 = $[137];
	return t56;
};
function _temp(state) {
	return state.shellHidden;
}
function _temp2(nftc1, nftc2) {
	return nftc1?.value === nftc2?.value;
}
function _temp3(e_1) {
	return e_1;
}
function _temp4(p) {
	return p.catch(_temp3);
}
function _temp5(e_2) {
	return e_2;
}
function _temp6(p_0) {
	return p_0.catch(_temp5);
}
//#endregion
export { NotesScreen };

//# sourceMappingURL=NotesScreen.mjs.map