import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; /** * A button that disable itself progressively until reset. */ export declare class CountdownButtonComponent implements OnDestroy, OnInit { /** * The text of button when it is clickable. */ actionText: string; /** * Waiting text to be displayed when it is not clickable. */ waitText: string; /** * Wait time to button being clickable again, in seconds. * @default 5 */ waitTime: number; /** * Output event to click in button when it is clickable. */ buttonClick: EventEmitter; /** * Compound text for show in button when it is in wait phase. * * It is compoung of remaining time and the `waitText` input. */ counterText: string; /** * Counter observable that hold internal logic of this component. */ counter$: Observable; /** * Empty constructor. */ constructor(); /** * Start timer on component init. */ ngOnInit(): void; /** * Empty `ngOnDestroy` method required by `untilDestroyed` operator from * `ngx-take-until-destroy` library. */ ngOnDestroy(): void; /** * Emits event for button click, disable the button and restart counter observable. */ dispatchAction(): void; /** * Start the countdown timer for enable back the button again. * * To avoid memory leak, the obserable will complete on: * 1. component destroy life cycle event * 2. when counter is equal to 0 * 3. button was clicked * * In each tick, 1s, the button label will be updated. */ startTimer(): void; }