(function (app) {
    'use strict';

    function load() {
        const el = document.getElementById('form-context');
        if (!el) {
            return {};
        }
        try {
            return JSON.parse(el.textContent || '{}');
        } catch (err) {
            console.error('[form] failed to parse #form-context', err);
            return {};
        }
    }

    app.modules.context = { load };
})(window.formApp);
