import * as React from "react";
import * as Constants from "~/common/constants";
import * as Actions from "~/common/actions";
import * as Events from "~/common/custom-events";
import { css } from "@emotion/react";
import { ButtonPrimary } from "~/components/system/components/Buttons";
const STYLES_MODAL = css`
text-align: center;
padding-bottom: 64px;
box-sizing: border-box;
max-width: 680px;
width: 95vw;
min-height: 630px;
border-radius: 4px;
background-color: ${Constants.system.white};
overflow: hidden;
box-shadow: 0 0 60px 8px rgba(0, 0, 0, 0.03);
`;
const STYLES_BUTTON_SECONDARY = {
backgroundColor: Constants.system.white,
boxShadow: `0 0 0 1px ${Constants.system.blue} inset`,
color: Constants.system.blue,
marginRight: 16,
width: 160,
textDecoration: `none`,
};
const STYLES_IMAGE = css`
width: 100%;
background-color: ${Constants.system.black};
`;
const STYLES_TITLE = css`
font-family: ${Constants.font.semiBold};
font-size: 32px;
padding-top: 40px;
margin-bottom: 16px;
`;
const STYLES_TEXT = css`
font-family: ${Constants.font.text};
font-size: 18px;
margin-bottom: 24px;
padding: 0 64px;
`;
const STYLES_LINK = css`
text-decoration: none;
color: ${Constants.system.white};
:visited {
color: ${Constants.system.white};
}
`;
export const announcements = [];
export class OnboardingModal extends React.Component {
state = {
step: 0,
slides: [],
};
componentDidMount = () => {
Actions.updateStatus({
onboarding: this.props.unseenAnnouncements,
});
let slides = [];
if (this.props.newAccount) {
slides = this.onboardingCopy;
}
for (let feature of this.announcements) {
if (this.props.unseenAnnouncements.includes(feature.title)) {
slides.push(feature);
}
}
if (!slides.length) {
Events.dispatchCustomEvent({
name: "delete-modal",
detail: {},
});
}
this.setState({ slides });
};
announcements = [
// {
// title: "New On Slate: Grid System 2.0",
// text:
// "We just introduced a completely new layout engine that gives you total control over the way you can organize and display your collections.",
// image: (
//
// ),
// button: (
//