import * as _ from "lodash"; import * as classNames from "classnames"; import * as React from "react"; import { CSSTransition } from 'react-transition-group'; import { Link, ILinkProps } from "../Link"; import { getCurrentYear } from "../../utilities/dates"; export enum FooterType { Simple = "Simple", Detailed = "Detailed", } export interface IFooterProps { type?: FooterType, mount?: boolean; help?: ILinkProps; policies?: ILinkProps[]; withHelp?: boolean; withPatent?: boolean; withCopyright?: boolean; } const defaultHelpProps: ILinkProps = { text: "Contact Us", href: "mailto:support@air.cam", } const defaultPoliciesProps: ILinkProps[] = [ { text: "Privacy Policy", href: "/resources/privacy.html", }, { text: "Terms of Service", href: "/resources/tos.html", }, ]; export const Footer = ({ type, mount = true, withHelp = true, withPatent = true, withCopyright = false, help = defaultHelpProps, policies = defaultPoliciesProps }: IFooterProps) => (
{withHelp && (
Need help?
)} {!_.isEmpty(policies) && (
{policies[0] && } {policies[1] && }
)} {withPatent && (
Patent Pending
)} {withCopyright && (
Aircam Copyright © {getCurrentYear()}. All rights are reserved.
)}
)