import { Component, OnInit, Optional } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { PanelLayoutComponent } from '@shared/layout/panel-layout/panel-layout.component';

@Component({
  selector: 'app-domain-options',
  templateUrl: './domain-options.component.html',
  styleUrls: ['./domain-options.component.scss']
})
export class DomainOptionsComponent implements OnInit {
  domainAction: string;
  domainData: Record<string, unknown>;

  constructor(
    private activatedRoute: ActivatedRoute,
    @Optional() public panelLayout?: PanelLayoutComponent
  ) { }

  ngOnInit(): void {
    this.domainAction = this.activatedRoute.snapshot.params.domain_action;
    this.domainData = {
      domain_name: this.activatedRoute.snapshot.params.domain_name,
    };
  }

}
