import { Component, input } from '@angular/core'; import { MatProgressBarModule } from '@angular/material/progress-bar'; @Component({ selector: 'app-loading', imports: [MatProgressBarModule], template: `

{{ text() || 'Cargando ' + what() + '…' }}

@if (figure()) { } `, styles: ` :host { display: flex; flex-direction: column; } :host(.figure) { min-height: 12rem; } .state { color: var(--color-text-secondary); font-size: 0.875rem; margin: 8px 0; } .skeleton { background: var(--color-border); border-radius: 10px; flex: 1; min-height: 10rem; opacity: 0.35; } `, host: { '[class.figure]': 'figure()' }, }) export class Loading { readonly what = input.required(); readonly text = input(''); readonly figure = input(false); }