import { Component, Input } from '@angular/core';
import { VspIcon } from './icon.component';
import { VspSkeleton } from './feedback.component';
/** A stack of shimmer rows shown while a block's data is loading. */
@Component({
selector: 'vsp-block-skeleton',
imports: [VspSkeleton],
template: `
@for (i of rowList; track i) {
}
`,
})
export class VspBlockSkeleton {
@Input() rows = 4;
get rowList(): number[] {
return Array.from({ length: this.rows }, (_, i) => i);
}
}
/** Default empty placeholder; overridden by a projected `[slot=empty]` node. */
@Component({
selector: 'vsp-block-empty',
imports: [VspIcon],
template: `
{{ title }}
@if (desc) {
{{ desc }}
}
`,
})
export class VspBlockEmpty {
@Input() title = '';
@Input() desc?: string;
}