import { r as registerInstance, h, F as Fragment, H as Host, g as getElement } from './index-ClISz4NF.js';
import { p as pick } from './utils-CQvUntGY.js';
import { S as Sizes } from './sizes-BcQO4NH2.js';
import { g as govHost } from './template-CoD1xawt.js';

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

export { GovTile as gov_tile };
//# sourceMappingURL=gov-tile.entry.js.map

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