/**
 * Copyright IBM Corp. 2026
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

import "../../globals/settings.js";
import { carbonElement } from "../../globals/decorators/carbon-element.js";
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
import iconLoader from "../../globals/internal/icon-loader.js";
import link_default from "../link/link.js";
import "../../globals/shared-enums.js";
import tile_default from "./tile.scss.js";
import { html } from "lit";
import { property } from "lit/decorators.js";
import { classMap } from "lit/directives/class-map.js";
import AILabel24 from "@carbon/icons/es/ai-label/24.js";
//#region src/components/tile/clickable-tile.ts
/**
* Copyright IBM Corp. 2019, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Clickable tile.
*
* @element cds-clickable-tile
*/
let CDSClickableTile = class CDSClickableTile extends link_default {
	constructor(..._args) {
		super(..._args);
		this.colorScheme = "";
		this.linkRole = "button";
		this.hasRoundedCorners = false;
		this.aiLabel = false;
		this.slug = false;
	}
	get _classes() {
		const { colorScheme, disabled, hasRoundedCorners, aiLabel, slug } = this;
		return classMap({
			[`cds--link`]: true,
			[`cds--link--disabled`]: disabled,
			[`cds--tile`]: true,
			[`cds--tile--clickable`]: true,
			[`cds--tile--${colorScheme}`]: colorScheme,
			[`cds--tile--slug-rounded`]: (aiLabel || slug) && hasRoundedCorners
		});
	}
	/**
	* If using `slug`, set `ai-label` attribute to true so
	* the styles are applied for slug as well
	*
	* remove in v12
	*/
	connectedCallback() {
		if (this.slug) {
			this.setAttribute("ai-Label", "");
			this.aiLabel = true;
		}
		super.connectedCallback();
	}
	/**
	* @returns The inner content.
	*/
	_renderInner() {
		return html`
      ${super._renderInner()}
      ${this.aiLabel || this.slug ? iconLoader(AILabel24, { class: `cds--tile--ai-label-icon` }) : ""}
      <slot name="decorator"></slot>
    `;
	}
	/**
	* A selector that will return the slug item.
	*
	* remove in v12
	*/
	static get slugItem() {
		return `cds-slug`;
	}
	/**
	* A selector that will return the AI Label item.
	*/
	static get aiLabelItem() {
		return `cds-ai-label`;
	}
	static {
		this.styles = tile_default;
	}
};
__decorate([property({
	attribute: "color-scheme",
	reflect: true
})], CDSClickableTile.prototype, "colorScheme", void 0);
__decorate([property({ attribute: "link-role" })], CDSClickableTile.prototype, "linkRole", void 0);
__decorate([property({
	type: Boolean,
	attribute: "has-rounded-corners"
})], CDSClickableTile.prototype, "hasRoundedCorners", void 0);
__decorate([property({
	type: Boolean,
	attribute: "ai-label"
})], CDSClickableTile.prototype, "aiLabel", void 0);
__decorate([property({ type: Boolean })], CDSClickableTile.prototype, "slug", void 0);
CDSClickableTile = __decorate([carbonElement(`cds-clickable-tile`)], CDSClickableTile);
var clickable_tile_default = CDSClickableTile;
//#endregion
export { clickable_tile_default as default };

//# sourceMappingURL=clickable-tile.js.map