'use strict';

var index = require('./index-BEF5cZxd.js');
var utils = require('./utils-NnC78QR3.js');
var sizes = require('./sizes-D5zsw2g5.js');
var template = require('./template-Cj6PcLmR.js');

utils.pick(sizes.Sizes, ['_S', '_M', '_L']);
const TileClass = {
    root: 'gov-tile',
    link: 'gov-tile__link',
    content: 'gov-tile__content',
    text: 'gov-tile__text',
    title: 'gov-tile__title',
    icon: 'gov-tile__icon',
    annotation: 'gov-tile__annotation',
};

const GovTile = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        /**
         * Tile’s size
         */
        this.size = "m";
        /**
         * Tiles border
         */
        this.noBorder = false;
        this.h = template.govHost(this.host);
    }
    render() {
        return (index.h(index.Host, { key: '31fcebee125c753089b2229cea0033dce9aa3133', class: this.h.classes(TileClass.root), size: this.size, orientation: this.orientation, clickable: this.href ? true : null }, index.h("slot", { key: 'b79748ea55bb2e86d887860c1143d82d75497966', name: "icon" }), index.h("div", { key: 'db8b61554f6943612c9d7165174926cfd205fcfb', class: TileClass.content }, index.h("div", { key: 'e844267c106109d0470176d3c89539f8f987c70f', class: TileClass.text }, index.h("div", { key: 'e4771f568d8848b87045293ebb10af5679f1a3b7', class: TileClass.title }, this.href ? (index.h(index.Fragment, null, index.h("a", { href: this.href, target: this.target, class: TileClass.link, ref: el => (this.triggerRef = el) }, index.h("slot", { name: "title" })), index.h("span", { class: TileClass.icon }, index.h("gov-icon", { name: "chevron-right", type: "components" })))) : (index.h("slot", { name: "title" }))), index.h("div", { key: 'cf1bf1a1c29e8879dc509b484325b82808db792a', class: `${TileClass.annotation} ${this.href ? `${TileClass.annotation}--padding` : ''}` }, index.h("slot", { key: '9a10f28fd144f1131eae6735342da9a5d93665e2' }))), index.h("slot", { key: '067476f1a27bad0fb50d86789a729f93b1f1e5ad', name: "button" }))));
    }
    /**
     * Returns a clickable element instance
     */
    async getTriggerRef() {
        return this.triggerRef;
    }
    get host() { return index.getElement(this); }
};

exports.gov_tile = GovTile;
//# sourceMappingURL=gov-tile.entry.cjs.js.map

//# sourceMappingURL=gov-tile.cjs.entry.js.map