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();
    const licenseeCompanyName = license.licenseStatus?.companyName?.trim();
    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: "bg-neutral-grey-100 text-neutral-grey-15 overflow-hidden border-none p-0 shadow-2xl sm:max-w-[420px]", children: [_jsx(DialogTitle, { className: "sr-only", children: "About Parhelia" }), _jsxs("div", { className: "bg-neutral-grey-100 relative h-32 w-full overflow-hidden", children: [_jsx("div", { className: "from-highlight-100/20 via-feedback-blue/10 absolute inset-0 bg-linear-to-br to-transparent" }), _jsx("div", { className: "bg-highlight-100/10 absolute -bottom-12 -left-12 h-32 w-32 rounded-full blur-3xl" }), _jsx("div", { className: "bg-feedback-blue/10 absolute -top-12 -right-12 h-32 w-32 rounded-full 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 rounded-full bg-white/20 blur-xl" }), _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", children: "parhelia" }), _jsx("p", { className: "text-neutral-grey-50 text-[10px] font-light tracking-[0.3em]", children: "Experience content in a new light" })] }), _jsxs("div", { className: "w-full space-y-4 rounded-xl border border-white/10 bg-white/5 p-6 backdrop-blur-sm", children: [_jsxs("div", { className: "flex items-center justify-between text-sm", children: [_jsx("span", { className: "text-neutral-grey-50 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-neutral-grey-50 font-light tracking-wide", children: "Build Date" }), _jsx("span", { className: "text-neutral-grey-50 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-neutral-grey-50 font-light tracking-wide", children: "License" }), _jsx(LicenseBadge, {})] }), licenseeCompanyName && (_jsxs(_Fragment, { children: [_jsx("div", { className: "h-px bg-white/5" }), _jsxs("div", { className: "flex min-w-0 items-center justify-between gap-4 text-sm", children: [_jsx("span", { className: "text-neutral-grey-50 font-light tracking-wide", children: "Licensee" }), _jsx("span", { className: "min-w-0 text-right font-medium break-words text-white", children: licenseeCompanyName })] })] }))] }))] }), _jsxs("div", { className: "space-y-4", children: [_jsx("p", { className: "text-neutral-grey-50 max-w-[280px] text-[11px] leading-relaxed", children: "Built with passion by the Parhelia team at Canvas Reply. Focusing on the future of AI-driven content management." }), _jsxs("div", { className: "text-neutral-grey-50 pt-2 text-[10px] font-light tracking-wider", children: ["\u00A9 ", new Date().getFullYear(), " CANVAS REPLY GMBH. ALL RIGHTS RESERVED."] })] })] })] }) }));
});
//# sourceMappingURL=AboutDialog.js.map