import { Group } from "../graphic/group";

export function initSceneGraph(scene) {
    const width = scene.table.tableNoFrameWidth, height = scene.table.tableNoFrameHeight;
    scene.tableGroup = new Group({
        x: 0,
        y: 0,
        width: width,
        height: height,
        clip: !0,
        pickable: !1
    }), scene.tableGroup.role = "table";
    const colHeaderGroup = createContainerGroup(0, 0, !scene.table.internalProps.enableTreeStickCell);
    colHeaderGroup.role = "col-header", scene.colHeaderGroup = colHeaderGroup;
    const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.options.enableTreeStickCell);
    cornerHeaderGroup.role = "corner-header", scene.cornerHeaderGroup = cornerHeaderGroup;
    const rowHeaderGroup = createContainerGroup(0, 0, !0);
    rowHeaderGroup.role = "row-header", scene.rowHeaderGroup = rowHeaderGroup;
    const bodyGroup = createContainerGroup(width, 0, !0);
    bodyGroup.role = "body", scene.bodyGroup = bodyGroup;
    const rightFrozenGroup = createContainerGroup(0, 0, !0);
    rightFrozenGroup.role = "right-frozen", scene.rightFrozenGroup = rightFrozenGroup;
    const bottomFrozenGroup = createContainerGroup(0, 0, !0);
    bottomFrozenGroup.role = "bottom-frozen", scene.bottomFrozenGroup = bottomFrozenGroup;
    const componentGroup = createContainerGroup(0, 0);
    componentGroup.role = "component", scene.componentGroup = componentGroup;
    const rightTopCornerGroup = createContainerGroup(0, 0, !0);
    rightTopCornerGroup.role = "corner-right-top-header", scene.rightTopCornerGroup = rightTopCornerGroup;
    const rightBottomCornerGroup = createContainerGroup(0, 0, !0);
    rightBottomCornerGroup.role = "corner-right-bottom-header", scene.rightBottomCornerGroup = rightBottomCornerGroup;
    const leftBottomCornerGroup = createContainerGroup(0, 0, !0);
    leftBottomCornerGroup.role = "corner-left-bottom-header", scene.leftBottomCornerGroup = leftBottomCornerGroup, 
    scene.tableGroup.addChild(bodyGroup), scene.tableGroup.addChild(rowHeaderGroup), 
    scene.tableGroup.addChild(bottomFrozenGroup), scene.tableGroup.addChild(colHeaderGroup), 
    scene.tableGroup.addChild(rightFrozenGroup), scene.tableGroup.addChild(rightBottomCornerGroup), 
    scene.tableGroup.addChild(rightTopCornerGroup), scene.tableGroup.addChild(leftBottomCornerGroup), 
    scene.tableGroup.addChild(cornerHeaderGroup), scene.tableGroup.addChild(componentGroup);
}

function createContainerGroup(width, height, clip) {
    return new Group({
        x: 0,
        y: 0,
        width: width,
        height: height,
        clip: null != clip && clip,
        pickable: !1
    });
}
//# sourceMappingURL=init-scenegraph.js.map
