// src/app/components/footer/footer.component.ts
import { Component, Output, EventEmitter } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'app-footer',
  standalone: true,
  imports: [CommonModule],
  template: `
    <footer class="bg-gray-800 text-white py-6" data-aos="fade-up">
      <div class="container mx-auto px-6 flex flex-col md:flex-row justify-between items-center">
        <div class="mb-4 md:mb-0">
          © {{currentYear}} Bay Area Affiliates, Inc. All rights reserved.
        </div>
        <div class="flex space-x-4 mb-4 md:mb-0">
          <!-- <a href="#" class="hover:text-blue-400"><i class="fab fa-facebook-f"></i></a>
          <a href="#" class="hover:text-blue-400"><i class="fab fa-twitter"></i></a>
          <a href="#" class="hover:text-blue-400"><i class="fab fa-linkedin-in"></i></a>
          <a href="#" class="hover:text-blue-400"><i class="fab fa-instagram"></i></a> -->
          <a href="tel:361-765-8400" class="hover:text-blue-400"><i class="fas fa-phone-alt mr-2"></i>361-765-8400</a>
        </div>
        <div class="hidden md:flex space-x-4">
          <button 
            class="text-gray-400 hover:text-white focus:outline-none"
            (click)="openPrivacyPolicy.emit()">
            Privacy Policy
          </button>
          <button 
            class="text-gray-400 hover:text-white focus:outline-none"
            (click)="openTerms.emit()">
            Terms of Service
          </button>
        </div>
      </div>
      <div class="container mx-auto px-6 mt-4 text-center md:hidden">
        <button 
          class="text-gray-400 hover:text-white mx-2 focus:outline-none"
          (click)="openPrivacyPolicy.emit()">
          Privacy Policy
        </button>
        <span class="text-gray-400">|</span>
        <button 
          class="text-gray-400 hover:text-white mx-2 focus:outline-none"
          (click)="openTerms.emit()">
          Terms of Service
        </button>
      </div>
    </footer>
  `
})
export class FooterComponent {
  currentYear = new Date().getFullYear();

  @Output() openPrivacyPolicy = new EventEmitter<void>();
  @Output() openTerms = new EventEmitter<void>();
}
