import { Component, inject } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { TenantService } from '../../services/tenant.service';
import { StoreFooterComponent, StoreFooterSection, StoreSocialLink } from './store-footer/store-footer.component';
import { StoreHeaderComponent, StoreHeaderAction } from './store-header/store-header.component';

@Component({
  selector: 'app-store-layout',
  imports: [RouterOutlet, StoreHeaderComponent, StoreFooterComponent],
  templateUrl: './store-layout.component.html',
  styleUrl: './store-layout.component.scss'
})
export class StoreLayoutComponent {
  private readonly tenantService = inject(TenantService);

  protected readonly currentYear = new Date().getFullYear();
  protected readonly tenant = this.tenantService.tenant;

  protected readonly headerActions: StoreHeaderAction[] = [
    {
      label: 'Carrito',
      iconClass: 'fa-solid fa-cart-shopping'
    },
    {
      label: 'Mi cuenta',
      iconClass: 'fa-solid fa-circle-user'
    }
  ];

  protected readonly footerSections: StoreFooterSection[] = [
    {
      heading: 'Cuenta',
      links: ['Mi cuenta', 'Mis compras', 'Cerrar sesion']
    },
    {
      heading: 'Ayuda',
      links: ['Contacto', 'Ayuda', 'Preguntas frecuentes']
    }
  ];

  protected readonly socialLinks: StoreSocialLink[] = [
    {
      label: 'Instagram',
      iconClass: 'fa-brands fa-instagram'
    },
    {
      label: 'WhatsApp',
      iconClass: 'fa-brands fa-whatsapp'
    },
    {
      label: 'Facebook',
      iconClass: 'fa-brands fa-facebook'
    },
    {
      label: 'LinkedIn',
      iconClass: 'fa-brands fa-linkedin-in'
    }
  ];
}
