import { safeCustomElement } from "../../shared/safe-custom-element.js";
import { TailwindStyledElement } from "../../shared/tailwind-element/index.js";
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.127.0/helpers/decorate.js";
import style_default from "./style.css?inline.js";
import { html } from "lit";
import { property } from "lit/decorators.js";
//#region src/components/lukso-share/index.ts
var LuksoShare = class LuksoShare extends TailwindStyledElement(style_default) {
	constructor(..._args) {
		super(..._args);
		this.customStyle = "";
		this.providers = "";
		this.defaultProviders = [
			"twitter",
			"instagram",
			"linkedin",
			"telegram",
			"discord",
			"reddit",
			"medium",
			"github"
		];
		this.defaultProviderLinks = {
			twitter: "https://twitter.com/ERC725Account",
			instagram: "https://www.instagram.com/lukso",
			linkedin: "https://linkedin.com/company/lukso",
			telegram: "https://t.me/LUKSO_News",
			discord: "https://discord.gg/lukso",
			reddit: "https://www.reddit.com/r/lukso",
			medium: "https://medium.com/lukso",
			github: "https://github.com/lukso-network"
		};
	}
	linkTemplate(name, url) {
		return html`<a
      href=${url}
      target="_blank"
      class="transition-all duration-300 rounded-full opacity-50 hover:opacity-80 hover:shadow-button-medium-hover-primary h-7 w-7"
      aria-label="${name}"
      ><img src="/assets/images/social-${name}.svg" alt=""
    /></a>`;
	}
	render() {
		const linkTemplates = [];
		let providers = this.defaultProviders;
		try {
			providers = JSON.parse(this.providers);
		} catch {}
		for (const provider of providers) if (typeof provider === "string") linkTemplates.push(this.linkTemplate(provider, this.defaultProviderLinks[provider]));
		else linkTemplates.push(this.linkTemplate(provider.name, provider.url));
		return html`<div
      class="grid gap-2 sm:gap-4"
      style="grid-template-columns: repeat(${providers.length}, max-content); ${this.customStyle}"
    >
      ${linkTemplates}
    </div>`;
	}
};
__decorate([property({
	type: String,
	attribute: "custom-style"
})], LuksoShare.prototype, "customStyle", void 0);
__decorate([property({ type: String })], LuksoShare.prototype, "providers", void 0);
LuksoShare = __decorate([safeCustomElement("lukso-share")], LuksoShare);
//#endregion
export { LuksoShare };
