HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/confeduphaar/public_html/wp-content/plugins/essential-blocks/src/blocks/wrapper/src/save.js
/*
 * WordPress Dependencies
 *
 */
import { useBlockProps, InnerBlocks } from "@wordpress/block-editor";

/*
 * Internal  Dependencies
 *
 */
import { SHAPE_DIVIDER_TOP, SHAPE_DIVIDER_BOTTOM } from "./constants";
import {
ShapeDividerContent, BlockProps
} from "@essential-blocks/controls";

const save = ({ attributes }) => {
    const {
        blockId,
        wrapperAlign,
        isWrapperWidth,
        wrpShapeTopInvert,
        wrpShapeBottomInvert,
        classHook,
    } = attributes;

    const alignmentClass =
        wrapperAlign === "center"
            ? "eb-wrapper-align-center"
            : wrapperAlign === "right"
                ? "eb-wrapper-align-right"
                : "";

    return (
        <BlockProps.Save attributes={attributes}>
            <div
                className={`eb-parent-wrapper eb-parent-${blockId} ${classHook}`}
            >
                <div
                    className={`eb-wrapper-outer ${blockId}${isWrapperWidth ? ` ${alignmentClass}` : ""
                        }`}
                >
                    {attributes[`${SHAPE_DIVIDER_TOP}Type`] != "" && (
                        <ShapeDividerContent
                            position="top"
                            style={attributes[`${SHAPE_DIVIDER_TOP}Type`]}
                            negative={wrpShapeTopInvert}
                        />
                    )}
                    {attributes[`${SHAPE_DIVIDER_BOTTOM}Type`] != "" && (
                        <ShapeDividerContent
                            position="bottom"
                            style={attributes[`${SHAPE_DIVIDER_BOTTOM}Type`]}
                            negative={wrpShapeBottomInvert}
                        />
                    )}
                    <div className="eb-wrapper-inner">
                        <div
                            className={`eb-wrapper-inner-blocks${!isWrapperWidth ? ` ${alignmentClass}` : ""
                                }`}
                        >
                            <InnerBlocks.Content />
                        </div>
                    </div>
                </div>
            </div>
        </BlockProps.Save>
    );
};

export default save;