import { r as registerInstance, h, i as getAssetPath, H as Host } from './index-dd1fc9a4.js';
import './common-ecdc423b.js';
import { D as DateTime } from './DateTime-d050ef49.js';
import './IntersectionHelper-2c725527.js';
import { H as Heading } from './Heading-224a452f.js';
import { P as Paragraph } from './Paragraph-783c7e7c.js';
import { R as ResponsiveContainer } from './ResponsiveContainer-f8909967.js';
import { T as ThemeProvider } from './ThemeProvider-2443ac46.js';
import './_commonjsHelpers-1d681858.js';
import { b as PrismicResponsiveImage, P as PrismicRichText } from './PrismicResponsiveImage-274c411c.js';
import './slugify-3ed342e5.js';
import { g as getAuthorsForPrismicDoc } from './prismic-c07abf42.js';
var resourceWebinarCss = ".sc-resource-webinar-h{display:block}.past.sc-resource-webinar-h .heading.sc-resource-webinar{text-align:center;-webkit-margin-before:89px;margin-block-start:89px}.past.sc-resource-webinar-h .heading.sc-resource-webinar .meta.sc-resource-webinar{-webkit-margin-after:var(--space-5);margin-block-end:var(--space-5)}.past.sc-resource-webinar-h .heading.sc-resource-webinar .ui-heading-1.sc-resource-webinar{-webkit-margin-after:var(--space-5);margin-block-end:var(--space-5);color:#010610}.past.sc-resource-webinar-h .heading.sc-resource-webinar .hosts.sc-resource-webinar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-webkit-margin-after:var(--space-9);margin-block-end:var(--space-9)}.past.sc-resource-webinar-h .heading.sc-resource-webinar .hosts.sc-resource-webinar .host.sc-resource-webinar{display:-ms-flexbox;display:flex}.past.sc-resource-webinar-h .heading.sc-resource-webinar .hosts.sc-resource-webinar .host.sc-resource-webinar+.host.sc-resource-webinar{-webkit-margin-before:var(--space-3);margin-block-start:var(--space-3)}.past.sc-resource-webinar-h .heading.sc-resource-webinar .hosts.sc-resource-webinar .host.sc-resource-webinar .avatar.sc-resource-webinar{border-radius:var(--radius-4);-webkit-margin-end:11px;margin-inline-end:11px;width:28px;height:28px}.past.sc-resource-webinar-h .heading.sc-resource-webinar .hosts.sc-resource-webinar .host.sc-resource-webinar .description.sc-resource-webinar{color:#73849A}.past.sc-resource-webinar-h .video.sc-resource-webinar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-margin-after:var(--space-11);margin-block-end:var(--space-11)}.past.sc-resource-webinar-h .video.blured.sc-resource-webinar wistia-video.sc-resource-webinar{-webkit-filter:blur(16px);filter:blur(16px)}.past.sc-resource-webinar-h .video.sc-resource-webinar .overlay-form.sc-resource-webinar{border-radius:var(--radius-2);text-align:center;position:absolute;z-index:1000;background:white;padding:48px}.past.sc-resource-webinar-h .video.sc-resource-webinar .overlay-form.sc-resource-webinar .heading-group.sc-resource-webinar .ui-heading.sc-resource-webinar{-webkit-margin-after:var(--space-3);margin-block-end:var(--space-3)}.past.sc-resource-webinar-h .article.sc-resource-webinar{-webkit-margin-after:var(--space-11);margin-block-end:var(--space-11);max-width:672px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}.future.sc-resource-webinar-h .landing-image.sc-resource-webinar{background:var(--c-lavender-70);width:100%;height:100%;position:absolute;z-index:-1;-o-object-fit:cover;object-fit:cover}.future.sc-resource-webinar-h .heading-group.sc-resource-webinar{-webkit-padding-before:var(--space-11);padding-block-start:var(--space-11);-webkit-padding-after:var(--space-11);padding-block-end:var(--space-11);position:relative;min-height:512px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.future.sc-resource-webinar-h .heading-group.sc-resource-webinar .ui-heading-1.sc-resource-webinar{max-width:704px;color:white}.future.sc-resource-webinar-h .heading-group.sc-resource-webinar .when.sc-resource-webinar{-webkit-margin-before:var(--space-5);margin-block-start:var(--space-5);color:white}.future.sc-resource-webinar-h .heading-group.sc-resource-webinar .meta.sc-resource-webinar{-webkit-margin-after:var(--space-5);margin-block-end:var(--space-5)}.future.sc-resource-webinar-h .heading-group.sc-resource-webinar .meta.sc-resource-webinar .type.sc-resource-webinar{color:white}.future.sc-resource-webinar-h .heading-group.sc-resource-webinar .register-button.sc-resource-webinar{background:white;color:#5061F2;-webkit-margin-before:64px;margin-block-start:64px}.future.sc-resource-webinar-h .wrapper.sc-resource-webinar{display:-ms-flexbox;display:flex;-webkit-margin-before:var(--space-11);margin-block-start:var(--space-11);-webkit-margin-after:var(--space-11);margin-block-end:var(--space-11)}.future.sc-resource-webinar-h .wrapper.sc-resource-webinar>*.sc-resource-webinar{-ms-flex-positive:1;flex-grow:1}.future.sc-resource-webinar-h .wrapper.sc-resource-webinar .article.sc-resource-webinar{max-width:576px}.future.sc-resource-webinar-h .wrapper.sc-resource-webinar .article.sc-resource-webinar .register-button.sc-resource-webinar{-webkit-margin-before:var(--space-6);margin-block-start:var(--space-6);background:#3880FF;color:white}@media screen and (max-width: 1023px){.future.sc-resource-webinar-h .wrapper.sc-resource-webinar{-ms-flex-direction:column;flex-direction:column}.future.sc-resource-webinar-h .wrapper.sc-resource-webinar .hosts.sc-resource-webinar{-webkit-margin-before:var(--space-11);margin-block-start:var(--space-11);-webkit-margin-start:0;margin-inline-start:0}}.future.sc-resource-webinar-h .hosts.sc-resource-webinar{-webkit-margin-start:var(--space-11);margin-inline-start:var(--space-11)}.future.sc-resource-webinar-h .hosts.sc-resource-webinar .ui-heading.sc-resource-webinar{-webkit-margin-after:40px;margin-block-end:40px}.future.sc-resource-webinar-h .hosts.sc-resource-webinar resource-author-item.sc-resource-webinar+resource-author-item.sc-resource-webinar{-webkit-margin-before:var(--space-3);margin-block-start:var(--space-3)}.future.sc-resource-webinar-h resource-meta.sc-resource-webinar{--tag-color:rgba(255, 255, 255, .8)}.meta.sc-resource-webinar{display:-ms-inline-flexbox;display:inline-flex}.meta.sc-resource-webinar .type.sc-resource-webinar{-webkit-margin-end:17px;margin-inline-end:17px}.article.sc-resource-webinar .ui-heading-2.sc-resource-webinar{-webkit-margin-after:var(--space-3);margin-block-end:var(--space-3)}.article.sc-resource-webinar p.sc-resource-webinar,.article.sc-resource-webinar li.sc-resource-webinar{color:#445B78}.article.sc-resource-webinar p.sc-resource-webinar+p.sc-resource-webinar,.article.sc-resource-webinar p.sc-resource-webinar+ul.sc-resource-webinar,.article.sc-resource-webinar ul.sc-resource-webinar+p.sc-resource-webinar,.article.sc-resource-webinar ul.sc-resource-webinar+ul.sc-resource-webinar{-webkit-margin-before:var(--space-5);margin-block-start:var(--space-5)}.article.sc-resource-webinar ul.sc-resource-webinar{-webkit-margin-start:38px;margin-inline-start:38px}.article.sc-resource-webinar li.sc-resource-webinar{position:relative}.article.sc-resource-webinar li.sc-resource-webinar+li.sc-resource-webinar{-webkit-margin-before:var(--space-5);margin-block-start:var(--space-5)}.article.sc-resource-webinar li.sc-resource-webinar::before{left:-38px;top:4px;position:absolute;content:\"\";background:var(--checkmark-path);height:20px;width:20px}.register-button.sc-resource-webinar{padding:16px 20px;font-weight:bold;text-transform:uppercase;font-size:16px;line-height:19px;letter-spacing:0.1em;border-radius:8px}site-modal.sc-resource-webinar .title.sc-resource-webinar{text-align:center}site-modal.sc-resource-webinar .title.sc-resource-webinar .ui-heading.sc-resource-webinar{-webkit-margin-after:var(--space-3);margin-block-end:var(--space-3)}";
var ResourceWebinar = /** @class */ (function () {
    function ResourceWebinar(hostRef) {
        var _this = this;
        registerInstance(this, hostRef);
        this.PastWebinar = function () {
            var OverlayForm = _this.OverlayForm;
            var data = _this.prismicData;
            var videoId = data.doc.data.wistia_id;
            var pastGate = _this.state.hubspotGatedPassed;
            return (h(ResponsiveContainer, null, h(ThemeProvider, { type: "editorial" }, h("section", { class: "heading" }, h("div", { class: "meta" }, h(Heading, { level: 6, class: "type" }, "Webinar"), h("resource-meta", { tags: data.tags, class: "tags" })), h(Heading, { level: 1 }, data.title), h("div", { class: "hosts" }, _this.hosts.map(function (host) { return (h("div", { class: "host" }, h(PrismicResponsiveImage, { class: "avatar", image: host.avatar }), h(Paragraph, { class: "description | .ui-theme--base" }, host.name, ', ', host.title))); }))), h("section", { class: "video " + (!pastGate ? 'blured' : '') }, !_this.state.hubspotGatedPassed
                ? h(OverlayForm, { data: data }) : '', videoId
                ? h("wistia-video", { videoId: videoId }) : ''), h("section", { class: "article" }, h(PrismicRichText, { richText: data.doc.data.description, leading: "prose" })))));
        };
        this.FutureWebinar = function () {
            var RegisterButton = _this.RegisterButton;
            var data = _this.prismicData;
            var date = new Date(data.doc.data.when);
            var image = data.doc.data.landing_image;
            return (h(ThemeProvider, { type: "editorial" }, h("section", { class: "heading-group" }, image.url
                ? h(PrismicResponsiveImage, { class: "landing-image", image: image })
                : h("div", { class: "landing-image" }), h(ResponsiveContainer, null, h("div", { class: "heading" }, h("div", { class: "meta" }, h(Heading, { level: 6, class: "type" }, "Webinar"), h("resource-meta", { tags: data.tags, class: "tags" })), h(Heading, { level: 1 }, data.title), h(Heading, { class: "when", level: 4 }, "Begins:", ' ', h(DateTime, { date: date, format: { weekday: 'long', month: 'long', day: 'numeric' } }), ' @ ', h(DateTime, { date: date, format: { hour: 'numeric', timeZoneName: 'short', timeZone: 'America/Chicago' } })), h(RegisterButton, null)))), h(ResponsiveContainer, null, h("section", { class: "wrapper" }, h("div", { class: "article" }, h(PrismicRichText, { richText: data.doc.data.description, leading: "prose" }), h(RegisterButton, null)), h("div", { class: "hosts" }, h(Heading, { level: 5 }, "Your speakers:"), _this.hosts.map(function (host) { return (h("resource-author-item", { author: host })); }))))));
        };
        this.RegisterButton = function () { return (h("button", { class: "register-button", onClick: function () {
                _this.state.showHubspotForm = true;
            } }, "Register Now")); };
        this.OverlayForm = function () {
            var data = _this.prismicData;
            var formId = data.doc.data.hubspot_form_id;
            return (h(ThemeProvider, { class: "overlay-form", type: "base" }, h("div", { class: "heading-group" }, h(Heading, { level: 3 }, "Stream ", data.title), h(Paragraph, null, "You're just a few clicks away from our free Webinar")), h("hubspot-form", { ajax: true, formId: formId, onFormSubmitted: function () {
                    _this.state.hubspotGatedPassed = true;
                } })));
        };
    }
    ResourceWebinar.prototype.componentWillLoad = function () {
        this.state.hubspotGatedPassed = false;
        this.hasHappened = new Date(this.prismicData.doc.data.when) < new Date();
        this.hosts = getAuthorsForPrismicDoc(this.prismicData.doc);
    };
    ResourceWebinar.prototype.render = function () {
        var _this = this;
        var _a = this, PastWebinar = _a.PastWebinar, FutureWebinar = _a.FutureWebinar;
        var formId = this.prismicData.doc.data.hubspot_form_id;
        return (h(Host, { style: {
                '--checkmark-path': "url(\"" + getAssetPath('assets/checkmark-circle.png') + "\")"
            }, class: {
                'past': this.hasHappened,
                'future': !this.hasHappened
            } }, this.hasHappened
            ? h(PastWebinar, null)
            : [h(FutureWebinar, null), h("site-modal", { open: this.state.showHubspotForm, modalClose: function () { return (_this.state.showHubspotForm = false); } }, h("div", { class: "title" }, h(Heading, null, "Register for ", this.prismicData.title), h(Paragraph, null, "Enter your information below to join the Webinar list")), h("hubspot-form", { formId: formId, ajax: false, onFormSubmitted: function () {
                        _this.state.hubspotGatedPassed = true;
                    } }))]));
    };
    Object.defineProperty(ResourceWebinar, "assetsDirs", {
        get: function () { return ["assets"]; },
        enumerable: false,
        configurable: true
    });
    return ResourceWebinar;
}());
ResourceWebinar.style = resourceWebinarCss;
export { ResourceWebinar as resource_webinar };
