import * as React from "react";
import { get } from "lodash";
import {
  faFacebookF,
  faGoogle,
  faTwitter,
  faInstagram,
} from "@fortawesome/free-brands-svg-icons";

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,
  Grid,
  GridItem,
  Image,
  Navigation,
  ListItem,
} from "@sc/plugins/webcomponents/v2";
import {
  NavigationLayouts,
  ItemTypes,
} from "@sc/plugins/webcomponents/v2/Navigation/types";

import { IconSource } from "@sc/plugins/webcomponents/v2/Icon/types";
import { 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={10}>
            <GridItem xs={5}>
              <Container style={{ maxWidth: 350 }}>
                <Image style={{ width: 40 }} src={theme.logoIcon} />
                <Text style={{ ...style.TEXT, padding: "20px 0" }}>
                  High fidelity wireframes include more real content, specific
                  typography choices, and information on image.
                </Text>
              </Container>
            </GridItem>
            <GridItem xs>
              <Container style={{ maxWidth: 600, margin: "0 auto" }}>
                <Grid style={{}}>
                  <GridItem xs={6}>
                    <Container style={{ padding: "0 40px" }}>
                      <Navigation
                        layout={NavigationLayouts.FIVE}
                        linkStyle={style.NAVIGATION.linkStyle}
                        items={[
                          { caption: "About Us", href: "./#" },
                          { caption: "Contact Us", href: "./#" },
                          { caption: "Pricing", href: "./#" },
                          { caption: "FAQs", href: "./#" },
                        ]}
                      />
                    </Container>
                  </GridItem>
                  <GridItem xs={6}>
                    <Container style={{ padding: "0 40px" }}>
                      <Navigation
                        layout={NavigationLayouts.FIVE}
                        linkStyle={style.NAVIGATION.linkStyle}
                        items={[
                          { caption: "About", href: "./#" },
                          { caption: "Blog", href: "./#" },
                          { caption: "Contacts", href: "./#" },
                        ]}
                      />
                    </Container>
                  </GridItem>
                </Grid>
              </Container>
            </GridItem>
            <GridItem xs={3}>
              <ListItem
                icon={IconTypes.LocationOn}
                iconStyle={{ color: theme.backgroundColor, paddingRight: 20 }}
              >
                <Text style={style.TEXT}>
                  Los Angeles,
                  <br />
                  359 Hidden Valley Road
                </Text>
              </ListItem>
              <ListItem
                icon={IconTypes.Email}
                iconStyle={{
                  color: theme.backgroundColor,
                  paddingRight: 20,
                }}
                style={{ marginTop: 20 }}
              >
                <Text style={style.TEXT}>Hellohero@gmail.com</Text>
              </ListItem>
            </GridItem>
          </Grid>

          <Navigation
            layout={NavigationLayouts.FOUR}
            items={[
              {
                caption: "Privacy Policy",
                href: "./privacy",
                type: ItemTypes.TEXT,
              },
              {
                caption: "Terms & Conditions",
                href: "./terms",
                type: ItemTypes.TEXT,
              },
            ]}
            style={{ marginTop: 100 }}
            linkStyle={{
              color: "black",
              listStyle: "none",
              display: "inline-block",
              padding: "0 20px",
              fontFamily: theme.fontFamily,
              fontSize: "10pt",
            }}
            copyrightStyle={{
              fontFamily: theme.fontFamily,
              fontSize: "10pt",
            }}
          />
        </Container>
      </Section>
    </Block>
  );
};

export default Layout;
