"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.imports = void 0;
const transpile_1 = require("../../transpile");
exports.imports = [
    { name: 'WmPageContent', from: '@wavemaker/app-rn-runtime/components/page/page-content/page-content.component' }
];
exports.default = {
    pre: (element, context) => {
        var _a, _b, _c;
        // checking if parent(page) is scrollable
        let currentNode = element.parentNode;
        while (currentNode) {
            if (((_a = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _a === void 0 ? void 0 : _a.rawTagName) === 'wm-page' &&
                ((_c = (_b = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.scrollable) == 'true') {
                element.setAttribute('scrollable', 'false');
                break;
            }
            currentNode = currentNode.parentNode;
        }
        return `<WmPageContent ${(0, transpile_1.transformAttrs)(element, context)} showskeleton={fragment.App.isSkeletonEnabled() && !fragment.startUpVariablesLoaded}>`;
    },
    post: (element, context) => '</WmPageContent>',
    imports: (element, context) => exports.imports,
    createComponent: (element, context) => (0, transpile_1.createComponent)(element, context)
};
//# sourceMappingURL=page-content.transformer.js.map