import * as React from "react";
import { get } from "lodash";
import { CheckCircleOutline } from "@material-ui/icons";

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

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

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

import { ImagePlaceholder, ImagePlaceholderTypes } from "../../Placeholders";
import theme from "../../theme";

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"),
          }}
        >
          <Container style={{ maxWidth: 900, margin: "0 auto" }}>
            <Grid>
              <GridItem xs={6}>
                <Headline style={style.HEADLINE}>Easy Pack</Headline>
                <List style={style.LIST}>
                  <ListItem
                    style={style.LI.style}
                    icon={IconTypes.CheckCircleOutline}
                    iconStyle={style.LI.iconStyle}
                  >
                    Full all day support
                  </ListItem>
                  <ListItem
                    style={style.LI.style}
                    icon={IconTypes.CheckCircleOutline}
                    iconStyle={style.LI.iconStyle}
                  >
                    Always open for communication
                  </ListItem>
                  <ListItem
                    style={style.LI.style}
                    icon={IconTypes.CheckCircleOutline}
                    iconStyle={style.LI.iconStyle}
                  >
                    Nice work approach
                  </ListItem>
                  <ListItem
                    style={style.LI.style}
                    icon={IconTypes.CheckCircleOutline}
                    iconStyle={style.LI.iconStyle}
                  >
                    Best field advisers ever
                  </ListItem>
                </List>
              </GridItem>
              <GridItem xs={6}>
                <Headline style={style.HEADLINE}>Ultimate Pack</Headline>
                <List style={style.LIST}>
                  <ListItem
                    style={style.LI.style}
                    icon={IconTypes.CheckCircleOutline}
                    iconStyle={style.LI.iconStyle}
                  >
                    Full all day support
                  </ListItem>
                  <ListItem
                    style={style.LI.style}
                    icon={IconTypes.CheckCircleOutline}
                    iconStyle={style.LI.iconStyle}
                  >
                    Always open for communication
                  </ListItem>
                  <ListItem
                    style={style.LI.style}
                    icon={IconTypes.CheckCircleOutline}
                    iconStyle={style.LI.iconStyle}
                  >
                    Nice work approach
                  </ListItem>
                  <ListItem
                    style={style.LI.style}
                    icon={IconTypes.CheckCircleOutline}
                    iconStyle={style.LI.iconStyle}
                  >
                    Best field advisers ever
                  </ListItem>
                </List>
              </GridItem>
            </Grid>
          </Container>
        </Container>
      </Section>
    </Block>
  );
};

export default Layout;
