'use strict';

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

const index$1 = require('./index-457520a1.js');

var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
    if (!privateMap.has(receiver)) {
        throw new TypeError("attempted to get private field on non-instance");
    }
    return privateMap.get(receiver);
};
var _server;
const BceElementAudio = class {
    constructor(hostRef) {
        index$1.registerInstance(this, hostRef);
        _server.set(this, window.BCE.file);
    }
    render() {
        return this.template.location.map(id => {
            const file = __classPrivateFieldGet(this, _server).get(id);
            return (file && (index$1.h("audio", { key: id, autoplay: this.template.autoplay, controls: true }, index$1.h("source", { src: file.url, type: file.type }))));
        });
    }
    static get style() { return ":host{display:block;margin:1rem 0}"; }
};
_server = new WeakMap();

exports.bce_element_audio = BceElementAudio;
