import { h } from "@stencil/core";
import { MediaFigureAlignment } from "./media-figure-alignment.enum";
/**
 * @slot default - Ska vara en bild (eller bildlik) komponent. Helst en `digi-media-image`.
 *
 * @enums MediaFigureAlignment - media-figure-alignment.enum.ts
 * @swedishName Mediefigur
 */
export class MediaFigure {
    constructor() {
        this.afFigcaption = undefined;
        this.afAlignment = MediaFigureAlignment.START;
    }
    get cssModifiers() {
        return {
            'digi-media-figure--align-start': this.afAlignment === 'start',
            'digi-media-figure--align-center': this.afAlignment === 'center',
            'digi-media-figure--align-end': this.afAlignment === 'end'
        };
    }
    render() {
        return (h("figure", { key: '1e0f32d194f45478ee10e7db3a3d61225dca5720', class: Object.assign({ 'digi-media-figure': true }, this.cssModifiers) }, h("div", { key: '66c0430815d692bead0f141bf403def13b3e0585', class: "digi-media-figure__image" }, h("slot", { key: '486e2b0a36c186f3574ba1ad78d86cf4df9c5310' })), this.afFigcaption && (h("figcaption", { key: '11b948928b9cd726a3f5d7d52be2124b99552719', class: "digi-media-figure__figcaption" }, this.afFigcaption))));
    }
    static get is() { return "digi-media-figure"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "$": ["media-figure.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["media-figure.css"]
        };
    }
    static get properties() {
        return {
            "afFigcaption": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Adds an optional figcaption element"
                        }],
                    "text": "L\u00E4gger till ett valfritt figcaptionelement"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-figcaption",
                "reflect": false
            },
            "afAlignment": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "MediaFigureAlignment",
                    "resolved": "MediaFigureAlignment.CENTER | MediaFigureAlignment.END | MediaFigureAlignment.START",
                    "references": {
                        "MediaFigureAlignment": {
                            "location": "import",
                            "path": "./media-figure-alignment.enum",
                            "id": "src/components/_media/media-figure/media-figure-alignment.enum.ts::MediaFigureAlignment"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Alignment of image and caption. Value can be 'start', 'center' or 'end'."
                        }],
                    "text": "Justering av bild och text. Kan vara 'start', 'center' eller 'end'"
                },
                "getter": false,
                "setter": false,
                "attribute": "af-alignment",
                "reflect": false,
                "defaultValue": "MediaFigureAlignment.START"
            }
        };
    }
}
