text: /**
   * Copyright (c) 2017-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  const React = require('react');
  
  const CompLibrary = require('../../core/CompLibrary.js');
  
  const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
  const Container = CompLibrary.Container;
  const GridBlock = CompLibrary.GridBlock;
  
  class HomeSplash extends React.Component {
    render() {
      const {siteConfig, language = ''} = this.props;
      const {baseUrl, docsUrl} = siteConfig;
      const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
      const langPart = `${language ? `${language}/` : ''}`;
      const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`;
  
      const SplashContainer = props => (
        <div className="homeContainer">
          <div className="homeSplashFade">
            <div className="wrapper homeWrapper">{props.children}</div>
          </div>
        </div>
      );
  
      const ProjectTitle = () => (
        <h2 className="projectTitle">
          {siteConfig.title}
          <small className="projectIntro">{siteConfig.tagline}</small>
        </h2>
      );
  
      const PromoSection = props => (
        <div className="section promoSection">
          <div className="promoRow">
            <div className="pluginRowBlock">{props.children}</div>
          </div>
        </div>
      );
  
      const Button = props => (
        <div className="pluginWrapper buttonWrapper">
          <a className="button" href={props.href} target={props.target}>
            {props.children}
          </a>
        </div>
      );
  
      return (
        <SplashContainer>
          <div className="inner">
            <ProjectTitle siteConfig={siteConfig} />
            <PromoSection>
              <Button href="docs/getting-started">Get Started</Button>
            </PromoSection>
          </div>
        </SplashContainer>
      );
    }
  }
  
  class Index extends React.Component {
    render() {
      const {config: siteConfig, language = ''} = this.props;
      const {baseUrl} = siteConfig;
  
      const Block = props => (
        <Container
          padding={['bottom', 'top']}
          id={props.id}
          background={props.background}>
          <GridBlock
            align="center"
            contents={props.children}
            layout={props.layout}
          />
        </Container>
      );
  
      const Features = () => (
        <Block layout="fourColumn">
          {[
            {
              content: `With typescript & jsx support, you don't need to play with grammar as string any more.`,
              title: 'Type Checking',
            },
            {
              content: 'Build encapsulated rules and compose them to make complex grammar, and you can reuse them just like UI components.',
              title: 'Rule-Based',
            },
            {
              content:'Since rule is written in JavaScript instead of string, you can easily debug & test grammar and parser.',
              title: 'Easy to Debug & Unit Test'
            }
          ]}
        </Block>
      );
  
      return (
        <div>
          <HomeSplash siteConfig={siteConfig} language={language} />
          <div className="mainContainer">
            <Features />
          </div>
        </div>
      );
    }
  }
  
  module.exports = Index;
  