import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Settings2 } from "lucide-react";
import { Button } from "../../../../components/ui/button";
import { Popover, PopoverContent, PopoverTrigger, } from "../../../../components/ui/popover";
function keepHelpPanelInteractionsInside(event) {
    const target = event.target;
    if (target?.closest('[data-help-panel="true"]')) {
        event.preventDefault();
    }
}
export function AgentSettingsPopover({ open, onOpenChange, children, }) {
    return (_jsxs(Popover, { open: open, onOpenChange: onOpenChange, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { size: "xs", variant: "outline", className: "text-neutral-grey-50 h-5 rounded border px-1.5 text-[11px]", "data-testid": "agent-settings-popover-trigger", children: [_jsx(Settings2, { className: "mr-1 h-3 w-3", strokeWidth: 1 }), "Agent settings"] }) }), _jsx(PopoverContent, { className: "w-80 p-3", align: "start", onInteractOutside: keepHelpPanelInteractionsInside, onPointerDownOutside: keepHelpPanelInteractionsInside, onFocusOutside: keepHelpPanelInteractionsInside, children: _jsx("div", { className: "space-y-3", children: children }) })] }));
}
//# sourceMappingURL=AgentSettingsPopover.js.map