import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { Dialog, DialogContent, DialogTitle, } from "../../components/ui/dialog";
import { useImperativeHandle, useState, forwardRef, useEffect } from "react";
import { buildDate, version } from "../../revision";
import { LicenseBadge, useLicense } from "../../licensing";
import { ParheliaIconWhite } from "../ui/ParheliaIconWhite";
export const AboutDialog = forwardRef((props, ref) => {
    const [visible, setVisible] = useState(false);
    const license = useLicense();
    useImperativeHandle(ref, () => ({
        onClose: (result) => {
            setVisible(false);
            props.onClose(result);
        },
    }));
    useEffect(() => {
        setVisible(true);
    }, []);
    return (_jsx(Dialog, { open: visible, onOpenChange: (open) => {
            if (!open) {
                setVisible(false);
                props.onClose(null);
            }
        }, children: _jsxs(DialogContent, { className: "sm:max-w-[420px] p-0 overflow-hidden border-none bg-slate-950 text-slate-200 shadow-2xl", children: [_jsx(DialogTitle, { className: "sr-only", children: "About Parhelia" }), _jsxs("div", { className: "relative h-32 w-full overflow-hidden bg-black", children: [_jsx("div", { className: "absolute inset-0 bg-linear-to-br from-purple-600/20 via-blue-600/10 to-transparent" }), _jsx("div", { className: "absolute -bottom-12 -left-12 h-32 w-32 rounded-full bg-purple-500/10 blur-3xl" }), _jsx("div", { className: "absolute -top-12 -right-12 h-32 w-32 rounded-full bg-blue-500/10 blur-3xl" }), _jsx("div", { className: "relative flex h-full items-center justify-center pt-4", children: _jsxs("div", { className: "relative", children: [_jsx("div", { className: "absolute inset-0 blur-xl bg-white/20 rounded-full" }), _jsx(ParheliaIconWhite, { size: 48, className: "relative z-10 text-white" })] }) })] }), _jsxs("div", { className: "flex flex-col items-center gap-6 px-8 py-8 text-center", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("h2", { className: "text-2xl font-extralight tracking-[0.2em] text-white uppercase", children: "parhelia" }), _jsx("p", { className: "text-[10px] font-light tracking-[0.3em] text-slate-500 uppercase", children: "Experience content in a new light" })] }), _jsxs("div", { className: "w-full space-y-4 rounded-xl bg-white/5 p-6 border border-white/10 backdrop-blur-sm", children: [_jsxs("div", { className: "flex items-center justify-between text-sm", children: [_jsx("span", { className: "text-slate-500 font-light tracking-wide", children: "Version" }), _jsx("span", { className: "font-medium text-white tabular-nums", children: version })] }), _jsx("div", { className: "h-px bg-white/5" }), _jsxs("div", { className: "flex items-center justify-between text-sm", children: [_jsx("span", { className: "text-slate-500 font-light tracking-wide", children: "Build Date" }), _jsx("span", { className: "text-slate-300 tabular-nums", children: buildDate })] }), !license?.licenseStatus?.licensingDisabled && (_jsxs(_Fragment, { children: [_jsx("div", { className: "h-px bg-white/5" }), _jsxs("div", { className: "flex items-center justify-between text-sm", children: [_jsx("span", { className: "text-slate-500 font-light tracking-wide", children: "License" }), _jsx(LicenseBadge, {})] })] }))] }), _jsxs("div", { className: "space-y-4", children: [_jsx("p", { className: "text-[11px] leading-relaxed text-slate-500 max-w-[280px]", children: "Built with passion by the Parhelia team at Canvas Reply. Focusing on the future of AI-driven content management." }), _jsxs("div", { className: "pt-2 text-[10px] font-light text-slate-600 tracking-wider", children: ["\u00A9 ", new Date().getFullYear(), " CANVAS REPLY GMBH. ALL RIGHTS RESERVED."] })] })] })] }) }));
});
//# sourceMappingURL=AboutDialog.js.map