// base-layout.component.ts
import { Component, Input } from '@angular/core';
import { IActivityDomain } from 'app/entities/activity/activity.model';
import { ResilientActivityProgressComponent } from 'app/resilient/resilient-activity/progress/resilient-activity-progress.component';

import SharedModule from 'app/shared/shared.module';

@Component({
  standalone: true, // Mark as standalone
  selector: 'base-detail-layout',
  templateUrl: './base-detail.component.html',
  styles: [`
    .content { padding: 1rem; }
  `],
  imports: [
    SharedModule,
    ResilientActivityProgressComponent
  ]
})
export class BaseDetailLayoutComponent {
  // Use [activityDomain]="entity()" to enable template domain values
  @Input() activityDomain!: IActivityDomain | null;  // The "!" makes this NOT optional. An exception will happen at runtime if not provided
  
  /*
  _activityDomain: IActivityDomain | null = null;
  @Input('activityDomain') set activityDomain(value: IActivityDomain | null) {
    this._activityDomain = value;
  }
  */
  
  // Use [title.text]="'My Title'" to provide the text of the title
  _title: string | undefined;
  @Input('title.text') set titleText(value: string) {
    this._title = value;
    console.log('title.text set to:', value);
  }
  
  // Use [title.translate]="app.entity.title" to provide the key for translation
  _titleI18N: string | undefined;
  @Input('title.translate') set titleTranslate(value: string) {
    this._titleI18N = value;
    console.log('title.translate set to:', value);
  }
}