'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Sparkles } from 'lucide-react';
import { useRouter } from 'next/navigation';
import { useTranslation } from 'react-i18next';
import { BuildMode } from '../../../../../../packages/core/src/domain/generated/output.js';
import { DropdownMenuItem } from '../../ui/dropdown-menu.js';
import { buildCreateUrl } from '../../../lib/url-params.js';
/**
 * Routes the user from the application page to the Control Center create
 * drawer pre-scoped to this application in spec-driven (SDD) mode. Navigation
 * is via the canonical `/create?...` URL built from `lib/url-params` — no
 * inline string literals (no-magic-values rule).
 */
export function OpenInControlCenterMenuItem({ applicationId }) {
    const router = useRouter();
    const { t } = useTranslation('web');
    const label = t('fab.openInControlCenterSdd');
    return (_jsxs(DropdownMenuItem, { onSelect: () => {
            router.push(buildCreateUrl({ applicationId, mode: BuildMode.Spec }));
        }, "aria-label": label, "data-testid": "open-in-control-center-sdd-menu-item", className: "cursor-pointer", children: [_jsx(Sparkles, { className: "size-3.5" }), _jsx("span", { children: label })] }));
}
