import { Component, computed, effect, signal } from '@angular/core';
import { RouterModule, RouterOutlet } from '@angular/router';
import { MatCardModule } from '@angular/material/card';
import { MatButtonModule } from '@angular/material/button';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [RouterOutlet, MatCardModule, MatButtonModule, RouterModule],
  templateUrl: './app.component.html',
  styleUrl: './app.component.scss',
})
export class AppComponent {
  readonly title = 'TVox Client SDK';
  titleReactive = signal('ciao');
  subtitle = computed(() => {
    if (this.titleReactive() == 'ciao') {
      return 'titolo giusto';
    } else {
      return 'sbagliato';
    }
  });

  // client = new TVox.Client({
  //   url: 'lts.teleniasoftware.com', //please, insert here your domain
  //   phoneManagedByTVoxClient: false,
  // });

  constructor() {
    effect(() => {
      console.debug('titleReactive changed: ', this.titleReactive());
    });
  }
}
