'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-bb72bde3.js');
require('./common-a086c7ac.js');
const Col = require('./Col-1452580d.js');
const Grid = require('./Grid-d43e9218.js');
require('./IntersectionHelper-16aa1ea1.js');
const Heading = require('./Heading-f7728cfd.js');
require('./Paragraph-9df20a65.js');
const ResponsiveContainer = require('./ResponsiveContainer-6a3dfdfc.js');
const ThemeProvider = require('./ThemeProvider-26877e1d.js');
require('./_commonjsHelpers-2e75ad90.js');
const PrismicResponsiveImage = require('./PrismicResponsiveImage-0adc07dc.js');
require('./slugify-28491f0b.js');
const trackingService = require('./tracking-service-934c16ed.js');

const resourceWhitepaperCss = "@charset \"UTF-8\";.resource-whitepaper__cta.sc-resource-whitepaper{background:linear-gradient(to bottom, #fff, #f6f8fc);border-bottom:1px solid #e5e7eb;margin-top:-78px;padding-top:78px}.resource-whitepaper__hgroup.sc-resource-whitepaper{margin:auto;display:flex;flex-direction:column;align-items:center;text-align:center;padding-top:var(--space-9);padding-bottom:var(--space-9);max-width:840px;text-align:center}.resource-whitepaper__hgroup.sc-resource-whitepaper .ui-heading-6.sc-resource-whitepaper{margin-bottom:var(--space-2)}.resource-whitepaper__tagline.sc-resource-whitepaper{max-width:800px;color:var(--c-carbon-60);letter-spacing:-0.02em;font-weight:600;line-height:32px;font-size:18px}.resource-whitepaper__content.sc-resource-whitepaper{padding-top:96px}.resource-whitepaper__content.sc-resource-whitepaper img.sc-resource-whitepaper{max-width:100%;height:auto}.resource-whitepaper__description.sc-resource-whitepaper p.sc-resource-whitepaper:first-child{color:#6e7f99;font-size:18px;line-height:28px}.resource-whitepaper__description.sc-resource-whitepaper ul.sc-resource-whitepaper{list-style-type:none;padding:0;margin:16px 0 32px;line-height:20px}.resource-whitepaper__description.sc-resource-whitepaper li.sc-resource-whitepaper{padding-left:20px;position:relative}.resource-whitepaper__description.sc-resource-whitepaper li.sc-resource-whitepaper:before{content:\"•\";margin-right:10px;opacity:0.8;position:absolute;left:0}";

const ResourceWhitepaper = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
  }
  checkForAds(prismicData) {
    var _a;
    const slices = ((_a = prismicData === null || prismicData === void 0 ? void 0 : prismicData.doc.data) === null || _a === void 0 ? void 0 : _a.body) || [];
    slices.forEach((slice) => {
      if (slice.slice_type === 'ad') {
        trackingService.trackView(`${location.host}${location.pathname}`, 'Resource Center');
      }
    });
  }
  componentWillLoad() {
    this.checkForAds(this.prismicData);
  }
  render() {
    if (!this.prismicData)
      return;
    const resource = this.prismicData;
    return [
      index.h(ThemeProvider.ThemeProvider, { type: "editorial" }, index.h("div", { class: "resource-whitepaper" }, index.h("div", { class: "resource-whitepaper__cta" }, index.h(ResponsiveContainer.ResponsiveContainer, null, index.h("hgroup", { class: "resource-whitepaper__hgroup" }, index.h(Heading.Heading, { level: 6 }, "Whitepaper"), index.h(Heading.Heading, { level: 1 }, resource.title), index.h("p", { class: "resource-whitepaper__tagline" }, resource.doc.data.tagline)))), index.h(ResponsiveContainer.ResponsiveContainer, null, index.h(Grid.Grid, { class: "resource-whitepaper__content" }, index.h(Col.Col, { cols: 12, xs: 12, sm: 6, md: 6 }, index.h(PrismicResponsiveImage.PrismicResponsiveImage, { image: resource.doc.data.cover_image, class: "resource-whitepaper__illustration" }), index.h(PrismicResponsiveImage.PrismicRichText, { richText: resource.doc.data.description, class: "resource-whitepaper__description" })), index.h(Col.Col, { cols: 12, xs: 12, sm: 6, md: 6 }, index.h("hubspot-form", { formId: resource.doc.data.hubspot_form_id }))))))
    ];
  }
};
ResourceWhitepaper.style = resourceWhitepaperCss;

exports.resource_whitepaper = ResourceWhitepaper;
