var __classPrivateFieldGet = (this && this.__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;
import { h } from "@stencil/core";
export class BceElementAudio {
    constructor() {
        _server.set(this, window.BCE.file);
    }
    render() {
        return this.template.location.map(id => {
            const file = __classPrivateFieldGet(this, _server).get(id);
            return (file && (h("audio", { key: id, autoplay: this.template.autoplay, controls: true },
                h("source", { src: file.url, type: file.type }))));
        });
    }
    static get is() { return "bce-element-audio"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() { return {
        "$": ["bce-element-audio.scss"]
    }; }
    static get styleUrls() { return {
        "$": ["bce-element-audio.css"]
    }; }
    static get properties() { return {
        "handler": {
            "type": "unknown",
            "mutable": false,
            "complexType": {
                "original": "InputHandler",
                "resolved": "InputHandler",
                "references": {
                    "InputHandler": {
                        "location": "import",
                        "path": "../../../utils/input-handler"
                    }
                }
            },
            "required": true,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            }
        },
        "language": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string | undefined",
                "references": {}
            },
            "required": false,
            "optional": true,
            "docs": {
                "tags": [],
                "text": ""
            },
            "attribute": "language",
            "reflect": false
        },
        "template": {
            "type": "unknown",
            "mutable": false,
            "complexType": {
                "original": "AudioElement",
                "resolved": "AudioElement",
                "references": {
                    "AudioElement": {
                        "location": "import",
                        "path": "./element-audio"
                    }
                }
            },
            "required": true,
            "optional": false,
            "docs": {
                "tags": [],
                "text": ""
            }
        }
    }; }
}
_server = new WeakMap();
