first commit

This commit is contained in:
2026-07-16 20:48:43 -03:00
commit 5696cee264
1111 changed files with 322270 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
import { create } from "zustand";
interface IConfirmStore {
visible: boolean;
message: string;
title: string;
onConfirm: () => void;
onCancel: () => void;
show: (message: string, onConfirm: () => void, onCancel: () => void) => void;
close: () => void;
clear: () => void;
}
export type ConfirmState = IConfirmStore;
const useConfirmStore = create<ConfirmState>()((set) => ({
visible: false,
message: "",
title: "",
onConfirm: () => {},
onCancel: () => {},
show: (message: string, onConfirm: () => void, onCancel: () => void) =>
set(() => ({
visible: true,
message: message,
onConfirm: onConfirm,
onCancel: onCancel,
title: "Atención",
})),
close: () =>
set(() => ({
visible: false,
message: "",
onConfirm: () => {},
onCancel: () => {},
title: "",
})),
clear: () =>
set(() => ({
visible: false,
message: "",
onConfirm: () => {},
onCancel: () => {},
title: "",
})),
}));
export { useConfirmStore };