import { useCallback } from "react";
export function useAgentSettingsNavigation(input) {
    const { editContext, activeProfile } = input;
    const handleOpenProfileSettings = useCallback(async (options) => {
        if (!editContext || !activeProfile?.id)
            return;
        const lang = editContext.currentItemDescriptor?.language || "en";
        await editContext.loadItem({
            id: activeProfile.id,
            language: lang,
            version: 0,
        }, {
            openInNewSlot: options?.openInNewSlot,
        });
        editContext.switchWorkspace("editor");
    }, [editContext, activeProfile?.id]);
    const handleOpenSkillItem = useCallback(async (skillId) => {
        if (!editContext || !skillId)
            return;
        const lang = editContext.currentItemDescriptor?.language || "en";
        await editContext.loadItem({
            id: skillId,
            language: lang,
            version: 0,
        });
        editContext.switchWorkspace("editor");
    }, [editContext]);
    return {
        handleOpenProfileSettings,
        handleOpenSkillItem,
    };
}
//# sourceMappingURL=useAgentSettingsNavigation.js.map