import { Component, inject, signal } from '@angular/core'; import { RouterLink } from '@angular/router'; import { ButtonComponent, ConfirmService, DrawerService, ModalService, } from '@africanies/africanies-ui'; import { DemoSectionComponent } from '../shared/demo-section.component'; import { PageHeaderComponent } from '../shared/page-header.component'; import { OVERLAY_CONFIRM, OVERLAY_DRAWER, OVERLAY_MODAL, } from '../snippets'; import { DemoDrawerPanel, DemoModalPanel, } from './overlay-demos'; /** * Playground demos for ModalService, DrawerService, and ConfirmService. * Requires provideAfricaniesUiOverlays() (already in playground app.config). */ @Component({ selector: 'app-overlay-page', standalone: true, imports: [ ButtonComponent, PageHeaderComponent, DemoSectionComponent, RouterLink, ], template: `
Service-driven dialogs for focused tasks: modal (forms), drawer (filters/side panels), and confirm (yes/no). Built on CDK Overlay. Closed only by their actions unless you pass dismissible: true for backdrop / Escape.
Last result: {{ modalResult() ?? '—' }}
Last result: {{ drawerResult() ?? '—' }}
Last choice: {{ confirmResult() ?? '—' }}