import * as React from "react";
import { get } from "lodash";

import { style } from "./style";
import { default as defaultData } from "./data.json";

import { doIShow, combineData } from "../../utils";

import theme from "../../theme";

import {
  Block,
  Section,
  Headline,
  Text,
  Container,
  List,
  ListItem,
  Grid,
  GridItem,
} from "@sc/plugins/webcomponents/v2";
import Icon, { IconTypes } from "@sc/plugins/webcomponents/v2/Icon";

type LayoutProps = {
  data: any;
};

const Layout: React.FC<LayoutProps> = ({ data }) => {
  const initialContent = {
    main_headline: {
      html: "Headline Goes Here",
    },
    sub_headline: {
      html: "Sub Headline Text Content Goes Here",
    },
  };

  const content = combineData(initialContent, defaultData, data);

  return (
    <Block>
      <Section style={style.SECTION}>
        <Container
          style={{
            ...style.SECTION_INNER,
            maxWidth: get(data, "section.pageMargin"),
          }}
        >
          <Grid spacing={5}>
            <GridItem xs={6}>
              <Container
                style={{
                  padding: "0 30px",
                }}
              >
                <Container style={{ textAlign: "center" }}>
                  <Icon
                    type={IconTypes.AccountCircle}
                    style={{ fontSize: "32pt" }}
                  />
                </Container>
                <Text style={style.TEXT}>
                  "Hands down the best process I've seen in the last 11 years.
                  Thank you!! I really value your approach"
                </Text>
                <Text style={{ ...style.TEXT, fontSize: "11pt" }}>
                  Jacob McDonald, Invision
                </Text>
              </Container>
            </GridItem>
            <GridItem xs={6}>
              <Container
                style={{
                  padding: "0 30px",
                }}
              >
                <Container style={{ textAlign: "center" }}>
                  <Icon
                    type={IconTypes.AccountCircle}
                    style={{ fontSize: "32pt" }}
                  />
                </Container>
                <Text style={style.TEXT}>
                  "Hands down the best process I've seen in the last 11 years.
                  Thank you!! I really value your approach"
                </Text>
                <Text style={{ ...style.TEXT, fontSize: "11pt" }}>
                  Jacob McDonald, Invision
                </Text>
              </Container>
            </GridItem>
          </Grid>
        </Container>
      </Section>
    </Block>
  );
};

export default Layout;
