import { LitElement, html, css, svg } from 'lit'; import { unsafeHTML } from 'lit/directives/unsafe-html.js'; import './card/winzer-file-card.js'; import './winzer-day-view.js'; import './winzer-menu-group.js'; import './winzer-modal.js'; import './card/winzer-card.js'; import './winzer-header.js'; import './winzer-nav.js'; import './toggle-switch.js'; export class WinzerApp extends LitElement { static properties = { isUserModalOpen: { type: Boolean }, isFilterModalOpen: { type: Boolean }, currentTab: { type: String }, // Configurable properties appTitle: { type: String, attribute: 'app-title' }, appSubtitle: { type: String, attribute: 'app-subtitle' }, navItems: { type: Array }, // [{ id, label, icon (svg string), url }] menuAccount: { type: Array }, menuSession: { type: Array }, }; constructor() { super(); this.isUserModalOpen = false; this.isFilterModalOpen = false; this.currentTab = 'news'; // Default tab // Defaults this.appTitle = 'WINZER-PORTAL'; this.appSubtitle = 'Badischer Winzerkeller'; // Default Navigation (can be overwritten via property) this.navItems = [ { id: 'news', label: 'News', url: '/news', icon: svg`` }, { id: 'anlieferung', label: 'Anlieferung', url: '/anlieferung', icon: svg`` }, { id: 'tresor', label: 'Datei-Tresor', url: '/tresor', icon: svg`` } ]; this.menuAccount = [ { label: 'Persönliche Daten', icon: svg``, action: 'profile' }, { label: 'Sicherheits-Einstellungen', icon: svg``, action: 'security' }, { label: 'Meine Buchungen', icon: svg``, action: 'bookings' } ]; this.menuSession = [ { label: 'Abmelden', icon: svg``, action: 'logout' } ]; } static styles = css` :host { display: block; background-color: var(--bg-white); min-height: 100vh; width: 100%; position: relative; } .content { padding: 20px; padding-bottom: 90px; } .section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; } h1 { font-size: 1.5rem; font-weight: 800; margin: 0; text-transform: uppercase; } .abo-label { font-size: 0.8rem; font-weight: 600; margin-left: auto; margin-right: 8px; } /* Filter Bar */ .filter-bar { display: flex; align-items: center; font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; cursor: pointer; } .filter-icon { margin-left: 8px; width: 24px; height: 24px; color: var(--text-dark); } /* Filter Modal Styles */ .filter-content { background-color: var(--bg-white); padding: 16px; border-radius: var(--radius-card); box-shadow: var(--shadow-sm); } .filter-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } .filter-row label { display: flex; align-items: center; font-weight: 700; font-size: 0.9rem; color: var(--text-dark); } .filter-row label svg { width: 20px; height: 20px; margin-right: 8px; color: var(--primary-color); } .filter-select { background-color: var(--bg-white); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; color: var(--text-dark); width: 160px; } .filter-btn { width: 100%; background-color: var(--primary-color); color: white; border: none; border-radius: var(--radius-sm); padding: 12px; font-weight: 600; font-size: 1rem; margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; } `; render() { return html`
`; } } customElements.define('winzer-app', WinzerApp);