"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("@storybook/react");
var React = __importStar(require("react"));
var styled_components_1 = __importDefault(require("styled-components"));
var index_1 = require("./index");
var StyledDiv = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  width: 400px;\n"], ["\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  width: 400px;\n"])));
var Container = function (_a) {
    var children = _a.children;
    return React.createElement(StyledDiv, null, children);
};
var now = Date.now() / 1000;
var oneDay = 86400;
react_1.storiesOf("Registry / Application Phase Countdown Timer", module)
    .add("Text Timers", function () {
    var eightDaysFromNow = now + oneDay * 8;
    return (React.createElement(Container, null, process.env.NODE_ENV !== "test" && (React.createElement(React.Fragment, null,
        React.createElement("h3", null, "Base style"),
        React.createElement(index_1.TextCountdownTimer, { endTime: eightDaysFromNow }),
        React.createElement("h3", null, "Warning style"),
        React.createElement(index_1.TextCountdownTimer, { endTime: eightDaysFromNow, warn: true }),
        React.createElement("h3", null, "Ended"),
        React.createElement(index_1.TextCountdownTimer, { endTime: now })))));
})
    .add("Progress Bar Timers", function () {
    var shortTotalSeconds = 60 * 1;
    var shortEndTime = now + shortTotalSeconds * 0.65;
    var totalSeconds = oneDay * 8;
    var endTime = now + oneDay * 3.5;
    var flavorText = "under community review";
    return (React.createElement(Container, null, process.env.NODE_ENV !== "test" && (React.createElement(React.Fragment, null,
        React.createElement("h3", null, "A Short Phase"),
        React.createElement("p", null, "The animation is more visible"),
        React.createElement(index_1.ProgressBarCountdownTimer, { endTime: shortEndTime, totalSeconds: shortTotalSeconds, flavorText: flavorText, displayLabel: "Waiting for approval", toolTipText: "Tool Tip for label" }),
        React.createElement("h3", null, "A Long Phase"),
        React.createElement(index_1.ProgressBarCountdownTimer, { endTime: endTime, totalSeconds: totalSeconds, flavorText: flavorText, displayLabel: "Waiting for approval", toolTipText: "Tool Tip for label" })))));
})
    .add("Two Phase Progress Bar Timers", function () {
    var shortTotalSeconds = 60 * 1;
    var shortEndTime = now + shortTotalSeconds * 0.65;
    var flavorText = "under community review";
    return (React.createElement(Container, null, process.env.NODE_ENV !== "test" && (React.createElement(React.Fragment, null,
        React.createElement("h3", null, "First phase is active"),
        React.createElement(index_1.TwoPhaseProgressBarCountdownTimer, { endTime: shortEndTime, totalSeconds: shortTotalSeconds, flavorText: flavorText, displayLabel: "Committing Votes", toolTipText: "Tool Tip text for Committing Votes", secondaryDisplayLabel: "Revealing Votes", secondaryToolTipText: "Tool Tip text for Revealing Votes", activePhaseIndex: 0 }),
        React.createElement("h3", null, "Second phase is active"),
        React.createElement(index_1.TwoPhaseProgressBarCountdownTimer, { endTime: shortEndTime, totalSeconds: shortTotalSeconds, flavorText: flavorText, displayLabel: "Revealing Votes", toolTipText: "Tool Tip text for Revealing Votes", secondaryDisplayLabel: "Committing Votes", secondaryToolTipText: "Tool Tip text for Committing Votes", activePhaseIndex: 1 })))));
});
var templateObject_1;
//# sourceMappingURL=PhaseCountdown.stories.js.map