2024-10-13 20:46:40 +03:00
|
|
|
import { LuVideo, LuX } from "react-icons/lu";
|
2024-03-28 02:03:05 +03:00
|
|
|
import { Button } from "../ui/button";
|
|
|
|
|
import { FaCompactDisc } from "react-icons/fa";
|
2024-06-02 20:00:59 +03:00
|
|
|
import { cn } from "@/lib/utils";
|
2025-03-16 18:36:20 +03:00
|
|
|
import { useTranslation } from "react-i18next";
|
2024-03-28 02:03:05 +03:00
|
|
|
|
|
|
|
|
type SaveExportOverlayProps = {
|
|
|
|
|
className: string;
|
|
|
|
|
show: boolean;
|
2024-10-13 20:46:40 +03:00
|
|
|
onPreview: () => void;
|
2024-03-28 02:03:05 +03:00
|
|
|
onSave: () => void;
|
|
|
|
|
onCancel: () => void;
|
|
|
|
|
};
|
|
|
|
|
export default function SaveExportOverlay({
|
|
|
|
|
className,
|
|
|
|
|
show,
|
2024-10-13 20:46:40 +03:00
|
|
|
onPreview,
|
2024-03-28 02:03:05 +03:00
|
|
|
onSave,
|
|
|
|
|
onCancel,
|
|
|
|
|
}: SaveExportOverlayProps) {
|
2025-03-16 18:36:20 +03:00
|
|
|
const { t } = useTranslation("components/dialog");
|
2024-03-28 02:03:05 +03:00
|
|
|
return (
|
|
|
|
|
<div className={className}>
|
|
|
|
|
<div
|
2024-06-02 20:00:59 +03:00
|
|
|
className={cn(
|
|
|
|
|
"pointer-events-auto flex items-center justify-center gap-2 rounded-lg px-2",
|
|
|
|
|
show ? "duration-500 animate-in slide-in-from-top" : "invisible",
|
|
|
|
|
"mx-auto mt-5 text-center",
|
|
|
|
|
)}
|
2024-03-28 02:03:05 +03:00
|
|
|
>
|
2024-10-13 20:46:40 +03:00
|
|
|
<Button
|
|
|
|
|
className="flex items-center gap-1 text-primary"
|
2025-03-16 18:36:20 +03:00
|
|
|
aria-label={t("button.cancel", { ns: "common" })}
|
2024-10-13 20:46:40 +03:00
|
|
|
size="sm"
|
|
|
|
|
onClick={onCancel}
|
|
|
|
|
>
|
|
|
|
|
<LuX />
|
2025-03-16 18:36:20 +03:00
|
|
|
{t("button.cancel", { ns: "common" })}
|
2024-10-13 20:46:40 +03:00
|
|
|
</Button>
|
2024-03-28 02:03:05 +03:00
|
|
|
<Button
|
|
|
|
|
className="flex items-center gap-1"
|
2025-03-16 18:36:20 +03:00
|
|
|
aria-label={t("export.fromTimeline.previewExport")}
|
2024-03-28 02:03:05 +03:00
|
|
|
size="sm"
|
2024-10-13 20:46:40 +03:00
|
|
|
onClick={onPreview}
|
2024-03-28 02:03:05 +03:00
|
|
|
>
|
2024-10-13 20:46:40 +03:00
|
|
|
<LuVideo />
|
2025-03-16 18:36:20 +03:00
|
|
|
{t("export.fromTimeline.previewExport")}
|
2024-03-28 02:03:05 +03:00
|
|
|
</Button>
|
|
|
|
|
<Button
|
2024-10-13 20:46:40 +03:00
|
|
|
className="flex items-center gap-1"
|
2025-03-16 18:36:20 +03:00
|
|
|
aria-label={t("export.fromTimeline.saveExport")}
|
2024-10-13 20:46:40 +03:00
|
|
|
variant="select"
|
2024-03-28 02:03:05 +03:00
|
|
|
size="sm"
|
2024-10-13 20:46:40 +03:00
|
|
|
onClick={onSave}
|
2024-03-28 02:03:05 +03:00
|
|
|
>
|
2024-10-13 20:46:40 +03:00
|
|
|
<FaCompactDisc />
|
2025-03-16 18:36:20 +03:00
|
|
|
{t("export.fromTimeline.saveExport")}
|
2024-03-28 02:03:05 +03:00
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|