"use strict";
/**
 * @file
 * Layout Builder Context Hook
 *
 * Provides hooks for accessing Layout Builder specific context
 * and configuration within React components.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = useLayoutBuilderContext;
const DrupalBridge_1 = require("../components/DrupalBridge");
/**
 * Hook to access Layout Builder context
 *
 * Provides unified access to all Layout Builder specific
 * context and configuration.
 */
function useLayoutBuilderContext() {
    const settings = (0, DrupalBridge_1.useDrupalSettings)();
    const api = (0, DrupalBridge_1.useDrupalApi)();
    const user = (0, DrupalBridge_1.useDrupalUser)();
    // Detect if we're in Layout Builder edit mode
    const isEditMode = settings.path?.currentPath?.includes('/layout') || false;
    // Extract block and region information from settings
    const blockId = settings.llmUi?.blockId;
    const regionId = settings.llmUi?.regionId;
    return {
        settings,
        api,
        user,
        isEditMode,
        blockId,
        regionId,
    };
}
//# sourceMappingURL=useLayoutBuilderContext.js.map