var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { LitElement, html, property, } from 'lit-element';
export default class ArenaEmbedSimple extends LitElement {
    constructor() {
        super(...arguments);
        this.currentHref = '';
    }
    createRenderRoot() {
        return this;
    }
    // Render element DOM by returning a `lit-html` template.
    render() {
        if (this.href) {
            const loading = html `<p class="embed__content">
        Грузится ембед… <a href="${this.href || ''}">${this.href}</a>
      </p>`;
            if (this.type === 'facebook') {
                return html `
          <div
            class="fb-post"
            data-href="${this.href}"
            data-width="auto"
            data-show-captions="false"
          ></div>
        `;
            }
            if (this.type === 'instagram') {
                return html `
          <blockquote
            class="instagram-media"
            data-instgrm-version="13"
            postid=${this.postid || ''}
            style="background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:540px; min-width:326px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);"
            data-lang="ru"
          >
            ${loading}
          </blockquote>`;
            }
            if (this.type === 'twitter') {
                return html `
          <blockquote class="twitter-tweet" postid=${this.postid || ''} data-lang="ru">
            <p class="embed__content">
              Грузится ембед… <a href="${this.href}">${this.href}</a>
            </p>
          </blockquote>`;
            }
        }
        return undefined;
    }
}
__decorate([
    property({
        type: String,
    }),
    __metadata("design:type", Object)
], ArenaEmbedSimple.prototype, "type", void 0);
__decorate([
    property({
        type: String,
    }),
    __metadata("design:type", Object)
], ArenaEmbedSimple.prototype, "postid", void 0);
__decorate([
    property({
        type: String,
    }),
    __metadata("design:type", Object)
], ArenaEmbedSimple.prototype, "href", void 0);
//# sourceMappingURL=ArenaEmbedSimple.js.map