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-document/components/myifx-gated-document-teaser/myifx-gated-document-teaser.scss?tag=myifx-gated-document-teaser","src/components/myifx-gated-document/components/myifx-gated-document-teaser/myifx-gated-document-teaser.tsx"],"sourcesContent":["@import '../../../../global/ifx/variables';\n\n:host {\n\tdisplay: block;\n}\n\nmyifx-gated-document-teaser {\n\tdisplay: block;\n\tposition: relative;\n\twidth: 100%;\n\tmin-height: 540px;\n\n\t.myifx-gated-document-teaser {\n\t\t&__image {\n\t\t\tbackground-size: 100% auto;\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position-x: 27%;\n\t\t\tbackground-position-y: top;\n\n\t\t\t// tablet\n\t\t\t@media screen and (min-width: $screen-sm) {\n\t\t\t\tbackground-size: 100% auto;\n\t\t\t\tbackground-position-x: center;\n\t\t\t\theight: auto;\n\t\t\t}\n\n\t\t\t// desktop\n\t\t\t@media screen and (min-width: $screen-lg) {\n\t\t\t\tbackground-position-y: 30%;\n\t\t\t}\n\t\t}\n\n\t\t&__hero {\n\t\t\tmax-width: 1280px;\n\t\t\tmin-height: 320px;\n\t\t\tmargin: 0 auto;\n\t\t\tposition: relative;\n\n\t\t\t// tablet to desktop\n\t\t\t@media screen and (min-width: $screen-sm) {\n\t\t\t\tmin-height: 534px;\n\t\t\t}\n\t\t}\n\n\t\t&__description {\n\t\t\twidth: 80%;\n\t\t\tmargin: 30px auto auto;\n\n\t\t\t// tablet\n\t\t\t@media only screen and (max-width: $screen-sm) {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\n\t\t\t// desktop\n\t\t\t@media only screen and (min-width: $screen-sm) {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n}\n","import {\n\tComponent, Element, getAssetPath, h, Host, Prop, Watch\n} from '@stencil/core';\nimport { getStringedObjectContainingSingleQuotesAsJSON } from '../../../../global/helper/text-helper';\nimport { GatedDocumentData } from '../../../../global/models/gated-document-data.model';\n\n@Component({\n\tassetsDirs: ['assets/images'],\n\tshadow: false,\n\tstyleUrl: 'myifx-gated-document-teaser.scss',\n\ttag: 'myifx-gated-document-teaser',\n})\nexport class MyifxGatedDocumentTeaser {\n\t_documentData: GatedDocumentData;\n\n\t@Element() host: HTMLMyifxGatedDocumentTeaserElement;\n\n\t@Prop() backgroundImageUrl: string;\n\t@Prop() documentDescription: string;\n\t@Prop() language = 'en';\n\n\t@Prop() documentData: GatedDocumentData | string;\n\n\t@Watch('documentData')\n\tdocumentDataWatcher(newValue: GatedDocumentData | string): void {\n\t\tif (typeof newValue === 'string') {\n\t\t\tthis._documentData = getStringedObjectContainingSingleQuotesAsJSON(\n\t\t\t\tnewValue\n\t\t\t);\n\t\t} else {\n\t\t\tthis._documentData = newValue;\n\t\t}\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.documentDataWatcher(this.documentData);\n\t\tthis.backgroundImageUrl = this.getBackgroundImageUrl();\n\t}\n\n\tgetBackgroundImageUrl = (): string => {\n\t\tconst assetsPath = this.backgroundImageUrl || getAssetPath(\n\t\t\t'assets/images/employee-curly-haired-man.jpg'\n\t\t);\n\t\treturn `url('${assetsPath}')`;\n\t};\n\n\tisDocumentDescriptionProvided = (): boolean => {\n\t\treturn this.documentDescription?.length > 0;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<div class=\"myifx-gated-document-teaser__image\" style={{ backgroundImage: this.backgroundImageUrl }}>\n\t\t\t\t\t<div class=\"myifx-gated-document-teaser__hero\">\n\t\t\t\t\t\t<myifx-gated-document-registration-cta\n\t\t\t\t\t\t\tlanguage={this.language}\n\t\t\t\t\t\t\tdocumentData={this.documentData}\n\t\t\t\t\t\t\tdocumentDescription={this.documentDescription}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{this.isDocumentDescriptionProvided()\n\t\t\t\t\t&& <div class=\"myifx-gated-document-teaser__description\"><p>{this.documentDescription}</p></div>\n\t\t\t\t}\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}