import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import ScreenView from "../screen-view";
import ScrollDownButton from "./scroll-down-button";
import Text from "../text";
import { Box, Row } from "../grid";
import { ImageWrapper, Inner, WelcomeWrapper as Wrapper } from "./styled";
const isImageSources = (content) => {
    const _content = content;
    return _content.src !== undefined || _content.alt !== undefined;
};
const Welcome = ({ image, externalRef, texts: { heading, subheading }, alignItems, justifyContent, additionalBlock, isReverseMobile, scStyles, }) => {
    return (_jsxs(Wrapper, { alignItems: alignItems, justifyContent: justifyContent, isReverseMobile: isReverseMobile, className: "ui-welcome", scStyles: scStyles, children: [_jsxs(Row, { className: "ui-welcome__row welcome__row", alignItems: alignItems, justifyContent: "space-between", children: [_jsxs(Inner, { isFullWidth: !image, className: "ui-welcome__inner", children: [_jsx(Box, { mb: "16px", className: "ui-welcome__heading-wrapper", children: typeof heading === "string" ? (_jsxs(_Fragment, { children: [_jsx(ScreenView.Large, { children: _jsx(Text.H1, { as: "h1", className: "ui-welcome__heading welcome__heading", children: heading }) }), _jsx(ScreenView.NotLarge, { children: _jsx(Text.H2, { as: "h1", fontFamily: "ExtraBold", textAlign: "center", className: "ui-welcome__heading welcome__heading", children: heading }) })] })) : (heading) }), typeof subheading === "string" ? (_jsxs(_Fragment, { children: [_jsx(ScreenView.Large, { children: _jsx(Text.H2, { className: "ui-welcome__subheading welcome__subheading", fontFamily: "Medium", fontWeight: "500", fontSize: 32, as: "h2", children: subheading }) }), _jsx(ScreenView.NotLarge, { children: _jsx(Text.T4, { className: "ui-welcome__subheading welcome__subheading", fontFamily: "Medium", fontWeight: "500", textAlign: "center", as: "h2", children: subheading }) })] })) : (subheading)] }), image && (_jsx(ImageWrapper, { className: "ui-welcome__img-wrapper welcome__img-wrapper", children: isImageSources(image) ? (_jsx("img", { className: "ui-welcome__img welcome__img", ...image })) : (_jsx(_Fragment, { children: image })) }))] }), additionalBlock && additionalBlock, externalRef && (_jsx(ScrollDownButton, { externalRef: externalRef, className: "ui-welcome__scroll" }))] }));
};
export default Welcome;
//# sourceMappingURL=index.js.map