/*!
 * Copyright 2017 by ChartIQ, Inc.
 * All rights reserved.
 */
/**
 * This component is the name of a component and a pin that will pin that component to all toolbars.
 *
 */
import React from "react";
import AppList from "./AppList";
import Hero from "./Hero";
import Carousel from "./Carousel";
/**
 * Home page. Contains carousels and a hero component
 * @param {object} props Component props
 * @param {array} props.cards An Array of app information from FDC
 * @param {func} props.viewAppShowcase Opens the AppShowcase page for a selected app
 */
const Home = (props) => (React.createElement("div", { className: "home" },
    React.createElement(Hero, { cards: props.cards, viewAppShowcase: props.viewAppShowcase }),
    props.tags.length > 0 &&
        props.tags.map((tag, i) => {
            const tagLabel = tag;
            const cards = props.cards.filter((card) => card.tags.includes(tag));
            return React.createElement(Carousel, { key: i, tag: tagLabel, cards: cards, viewAppShowcase: props.viewAppShowcase });
        }),
    props.tags.length === 0 && React.createElement(AppList, { cards: props.cards, viewAppShowcase: props.viewAppShowcase })));
export default Home;
//# sourceMappingURL=Home.js.map