import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Brain, Layers, Sparkles, Type, Wrench } from "lucide-react";
import { ParheliaAgentIcon } from "../../ui/Icons";
import { CopyButton } from "../../../components/ui/copy-button";
import { sanitizeSvg } from "../../../lib/sanitize";
import { GroupedFieldConfigPanel, } from "./GroupedFieldConfigPanel";
const FIELD_GROUPS = [
    {
        title: "Identity",
        description: "How the profile presents itself to users.",
        icon: _jsx(Type, { className: "h-4 w-4", strokeWidth: 1 }),
        fieldNames: [
            ["Display Title"],
            ["Agent User Display Name"],
            ["Description"],
            ["Greeting Message"],
        ],
    },
    {
        title: "Models",
        description: "Default model and available model set.",
        icon: _jsx(Sparkles, { className: "h-4 w-4", strokeWidth: 1 }),
        fieldNames: [["Default Model"], ["Models"]],
    },
    {
        title: "Skills",
        description: "Available skills and which profiles the agent may switch to.",
        icon: _jsx(Layers, { className: "h-4 w-4", strokeWidth: 1 }),
        fieldNames: [
            ["Allowed Skills"],
            ["Available Skills"],
            ["Preload Skills"],
            ["Allowed Switch Profiles"],
        ],
    },
    {
        title: "Tools",
        description: "Which tools this profile may use and tool-call behavior.",
        icon: _jsx(Wrench, { className: "h-4 w-4", strokeWidth: 1 }),
        fieldNames: [
            ["Default Tools", "Allowed Tools"],
            ["Ask Mode Tools", "Read-Only Mode Tools"],
            ["On-Demand Tools", "Available Tools"],
            ["Max Tool Calls"],
            ["Disable Tool Call Pruning"],
        ],
    },
    {
        title: "Behavior",
        description: "Controls how the profile operates in the editor.",
        icon: _jsx(Brain, { className: "h-4 w-4", strokeWidth: 1 }),
        fieldNames: [
            ["Instructions"],
            ["Include Editor Context"],
            ["Auto Start On Create"],
            ["Enable Quick Actions"],
            ["Sitecore Allowances"],
            ["Filesystem Allowances"],
            ["Hidden from Overview"],
        ],
    },
];
export function AgentProfileConfigPanel({ itemId, title, svgIcon, onClose, actions, refreshToken = 0, }) {
    const headerIcon = svgIcon ? (_jsx("span", { className: "inline-flex h-4 w-4 items-center justify-center [&>svg]:h-full [&>svg]:w-full", dangerouslySetInnerHTML: { __html: sanitizeSvg(svgIcon) } })) : (_jsx(ParheliaAgentIcon, { className: "h-4 w-4", strokeWidth: 1 }));
    return (_jsx(GroupedFieldConfigPanel, { itemId: itemId, title: title, onClose: onClose, actions: actions, refreshToken: refreshToken, fieldGroups: FIELD_GROUPS, headerIcon: headerIcon, headerSubline: _jsxs(_Fragment, { children: [_jsx("span", { className: "truncate font-mono", children: itemId }), _jsx(CopyButton, { textToCopy: itemId, iconOnly: true, className: "text-neutral-grey-50 hover:text-neutral-grey-50 cursor-pointer", "data-testid": "agent-profile-id-copy" })] }), loadErrorTitle: "Unable to load agent profile", emptyMessage: "No editable settings were found for this profile.", fallbackTitle: "Agent Profile", footerLeadingText: "For temperature, cost limits, document upload, and other advanced options use the " }));
}
export default AgentProfileConfigPanel;
//# sourceMappingURL=AgentProfileConfigPanel.js.map