import React, { useEffect } from 'react';
import Start from './components/Start/Start';
import Center from './components/Center/Center';
import End from './components/End/End';
import { st, classes } from './Footer.st.css.js';
import Divider from '../../../Divider';
import { buildChildrenObject } from '../../../common/utils/buildChildrenObject';
import deprecationLog from '../../../utils/deprecationLog';
/** Layout footer component of 3 columns */
const Footer = ({ divider = false, className, children, dataHook, ...props }) => {
    useEffect(() => {
        if (divider) {
            deprecationLog('<Page.Footer/> - prop "divider" is deprecated and will be removed in next major release, please use "showDivider" property instead.');
        }
    }, [divider]);
    const showDivider = props.showDivider ?? divider;
    const childrenObj = buildChildrenObject(children, {
        Start: React.createElement(Start, { key: "start" }),
        Center: React.createElement(Center, { key: "center" }),
        End: React.createElement(End, { key: "end" }),
    });
    return (React.createElement("div", { className: classes.root },
        showDivider && (React.createElement("div", { className: classes.divider },
            React.createElement(Divider, null))),
        React.createElement("div", { className: st(classes.container, className), "data-hook": dataHook }, Object.values(childrenObj))));
};
Footer.displayName = 'Page.Footer';
Footer.Start = Start;
Footer.Center = Center;
Footer.End = End;
Footer.Start.displayName = 'Page.Footer.Start';
Footer.Center.displayName = 'Page.Footer.Center';
Footer.End.displayName = 'Page.Footer.End';
export default Footer;
//# sourceMappingURL=Footer.js.map