import { html } from 'lit' import { customElement, property } from 'lit/decorators.js' import { styleMap } from 'lit/directives/style-map.js' import { TailwindStyledElement } from '@/shared/tailwind-element' import { customClassMap } from '@/shared/directives' import style from './style.scss?inline' import '@/components/lukso-profile' export type CardVariants = 'basic' | 'with-header' | 'profile' @customElement('lukso-card') export class LuksoCard extends TailwindStyledElement(style) { @property({ type: String }) variant: CardVariants = 'basic' @property({ type: String, attribute: 'background-url' }) backgroundUrl = '' @property({ type: String, attribute: 'profile-url' }) profileUrl = '' @property({ type: String, attribute: 'profile-address' }) profileAddress = '' @property({ type: Boolean, attribute: 'is-fixed-width' }) isFixedWidth = false @property({ type: Boolean, attribute: 'is-fixed-height' }) isFixedHeight = false private defaultStyles = `rounded-3xl shadow-pink-drop-shadow-2xl` basicTemplate() { return html`
` } withHeaderTemplate() { return html`
` } profileTemplate() { return html`
` } render() { switch (this.variant) { case 'with-header': return this.withHeaderTemplate() case 'profile': return this.profileTemplate() default: return this.basicTemplate() } } } declare global { interface HTMLElementTagNameMap { 'lukso-card': LuksoCard } }