/**
 * 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 FocusMixin from "../../globals/mixins/focus.js";
import skip_to_content_default$1 from "./skip-to-content.scss.js";
import { LitElement, html } from "lit";
import { property } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
//#region src/components/skip-to-content/skip-to-content.ts
/**
* Copyright IBM Corp. 2020, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Skip-to-content link.
*
* @element cds-skip-to-content
*/
let CDSSkipToContent = class CDSSkipToContent extends FocusMixin(LitElement) {
	constructor(..._args) {
		super(..._args);
		this.linkAssisstiveText = "Skip to main content";
	}
	connectedCallback() {
		if (!this.hasAttribute("role")) this.setAttribute("role", "navigation");
		super.connectedCallback();
	}
	render() {
		const { linkAssisstiveText } = this;
		return html`
      <a class="${"cds"}--skip-to-content" href="${ifDefined(this.href)}"
        ><slot>${linkAssisstiveText}</slot></a
      >
    `;
	}
	updated(changedProperties) {
		if (changedProperties.has("linkAssisstiveText")) {
			const { linkAssisstiveText } = this;
			this.setAttribute("aria-label", linkAssisstiveText);
		}
	}
	static {
		this.shadowRootOptions = {
			...LitElement.shadowRootOptions,
			delegatesFocus: true
		};
	}
	static {
		this.styles = skip_to_content_default$1;
	}
};
__decorate([property({ attribute: "link-assistive-text" })], CDSSkipToContent.prototype, "linkAssisstiveText", void 0);
__decorate([property()], CDSSkipToContent.prototype, "href", void 0);
CDSSkipToContent = __decorate([carbonElement(`cds-skip-to-content`)], CDSSkipToContent);
var skip_to_content_default = CDSSkipToContent;
//#endregion
export { skip_to_content_default as default };

//# sourceMappingURL=skip-to-content.js.map