import {
  Component,
  input,
  output
} from '@angular/core';
import { NgIcon, provideIcons } from '@ng-icons/core';
import {
  lucideHeadphones,
  lucideMic,
  lucideMicOff,
  lucideMonitor,
  lucideMonitorOff,
  lucidePhone,
  lucidePhoneOff,
  lucideVideo,
  lucideVideoOff,
  lucideVolume2
} from '@ng-icons/lucide';

import { APP_TRANSLATE_IMPORTS } from '../../core/i18n';

@Component({
  selector: 'app-private-call-controls',
  standalone: true,
  imports: [NgIcon, ...APP_TRANSLATE_IMPORTS],
  viewProviders: [
    provideIcons({
      lucideHeadphones,
      lucideMic,
      lucideMicOff,
      lucideMonitor,
      lucideMonitorOff,
      lucidePhone,
      lucidePhoneOff,
      lucideVideo,
      lucideVideoOff,
      lucideVolume2
    })
  ],
  templateUrl: './private-call-controls.component.html'
})
export class PrivateCallControlsComponent {
  readonly connected = input.required<boolean>();
  readonly muted = input.required<boolean>();
  readonly deafened = input.required<boolean>();
  readonly cameraEnabled = input.required<boolean>();
  readonly screenSharing = input.required<boolean>();
  readonly showSpeakerphoneButton = input(false);
  readonly speakerphoneEnabled = input(false);

  readonly joinRequested = output();
  readonly muteToggled = output();
  readonly deafenToggled = output();
  readonly cameraToggled = output();
  readonly screenShareToggled = output();
  readonly speakerphoneToggled = output();
  readonly leaveRequested = output();
}
