import * as _angular_core from '@angular/core'; import { WritableSignal, Signal } from '@angular/core'; import { NumberInput, BooleanInput } from '@angular/cdk/coercion'; import * as ng_primitives_state from 'ng-primitives/state'; import { SetterOptions } from 'ng-primitives/state'; import * as rxjs from 'rxjs'; import { Observable } from 'rxjs'; /** * The `NgpPaginationButton` directive is used to create a pagination button. */ declare class NgpPaginationButton { /** * Define the page this button represents. */ readonly page: _angular_core.InputSignalWithTransform; /** * Whether the button is disabled. */ readonly disabled: _angular_core.InputSignalWithTransform; protected readonly state: { page: _angular_core.Signal; disabled: _angular_core.Signal; goToPage: () => void; }; /** * Go to the page this button represents. */ goToPage(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The `NgpPaginationFirst` directive is used to create a pagination button that navigates to the first page. */ declare class NgpPaginationFirst { /** * Whether the button is disabled. */ readonly disabled: _angular_core.InputSignalWithTransform; protected readonly state: { disabled: _angular_core.Signal; goToFirstPage: () => void; }; /** * Go to the first page. */ goToFirstPage(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The `NgpPaginationLast` directive is used to create a pagination button that navigates to the last page. */ declare class NgpPaginationLast { /** * Whether the button is disabled. */ readonly disabled: _angular_core.InputSignalWithTransform; protected readonly state: { disabled: _angular_core.Signal; goToLastPage: () => void; }; /** * Go to the last page. */ goToLastPage(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The `NgpPaginationNext` directive is used to create a pagination button that navigates to the next page. */ declare class NgpPaginationNext { /** * Whether the button is disabled. */ readonly disabled: _angular_core.InputSignalWithTransform; protected readonly state: { disabled: _angular_core.Signal; goToNextPage: () => void; }; /** * Go to the next page. */ goToNextPage(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The `NgpPaginationPrevious` directive is used to create a pagination button that navigates to the previous page. */ declare class NgpPaginationPrevious { /** * Whether the button is disabled. */ readonly disabled: _angular_core.InputSignalWithTransform; protected readonly state: { disabled: _angular_core.Signal; goToPreviousPage: () => void; }; /** * Go to the previous page. */ goToPreviousPage(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * The `NgpPagination` directive is used to create a pagination control. */ declare class NgpPagination { /** * The currently selected page. Leave unset for uncontrolled usage, where the * internal state is seeded from `defaultPage`. */ readonly page: _angular_core.InputSignalWithTransform; /** * The default page for uncontrolled usage. * @default 1 */ readonly defaultPage: _angular_core.InputSignalWithTransform; /** * The event that is fired when the page changes. */ readonly pageChange: _angular_core.OutputEmitterRef; /** * The total number of pages. */ readonly pageCount: _angular_core.InputSignalWithTransform; /** * Whether the pagination is disabled. */ readonly disabled: _angular_core.InputSignalWithTransform; /** * The control state for the pagination. * @internal */ protected readonly state: { page: _angular_core.WritableSignal; pageCount: _angular_core.Signal; pageChange: rxjs.Observable; disabled: _angular_core.WritableSignal; setDisabled: (value: boolean) => void; firstPage: _angular_core.Signal; lastPage: _angular_core.Signal; setPage: (value: number, options?: ng_primitives_state.SetterOptions) => void; setDefaultPage: (value: number) => void; goToPage: (page: number) => void; }; /** * Go to the specified page. * @param page The page to go to. */ goToPage(page: number): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } interface NgpPaginationState { /** * The currently selected page. */ readonly page: WritableSignal; /** * The total number of pages. */ readonly pageCount: Signal; /** * Whether the pagination is disabled. */ readonly disabled: Signal; /** * Set the disabled state (e.g. from a form control). * @param disabled The disabled state. */ setDisabled: (disabled: boolean) => void; /** * Determine if we are on the first page. * @internal */ readonly firstPage: Signal; /** * Determine if we are on the last page. * @internal */ readonly lastPage: Signal; /** * The event that is fired when the page changes. */ readonly pageChange: Observable; /** * Set the current page directly (no bounds navigation logic). * @param page The page to set. * @param options Setter options, e.g. `{ emit: false }` to suppress change emission. */ setPage: (page: number, options?: SetterOptions) => void; /** * Set the default page for uncontrolled usage. * @param page The default page to set. */ setDefaultPage: (page: number) => void; /** * Go to the specified page. * @param page The page to go to. */ goToPage: (page: number) => void; } interface NgpPaginationProps { /** * The currently selected page. When `undefined`, the pagination is uncontrolled * and seeds from `defaultPage`. */ readonly page?: Signal; /** * The default page for uncontrolled usage. */ readonly defaultPage?: Signal; /** * The total number of pages. */ readonly pageCount?: Signal; /** * Whether the pagination is disabled. */ readonly disabled?: Signal; /** Callback fired when the page state changes. */ onPageChange: (page: number) => void; } declare const NgpPaginationStateToken: _angular_core.InjectionToken; pageCount: Signal; pageChange: Observable; disabled: WritableSignal; setDisabled: (value: boolean) => void; firstPage: Signal; lastPage: Signal; setPage: (value: number, options?: SetterOptions) => void; setDefaultPage: (value: number) => void; goToPage: (page: number) => void; }>>; declare const ngpPagination: ({ page: _page, defaultPage: _defaultPage, pageCount: _pageCount, disabled: _disabled, onPageChange, }: NgpPaginationProps) => { page: WritableSignal; pageCount: Signal; pageChange: Observable; disabled: WritableSignal; setDisabled: (value: boolean) => void; firstPage: Signal; lastPage: Signal; setPage: (value: number, options?: SetterOptions) => void; setDefaultPage: (value: number) => void; goToPage: (page: number) => void; }; declare const injectPaginationState: { (): Signal<{ page: WritableSignal; pageCount: Signal; pageChange: Observable; disabled: WritableSignal; setDisabled: (value: boolean) => void; firstPage: Signal; lastPage: Signal; setPage: (value: number, options?: SetterOptions) => void; setDefaultPage: (value: number) => void; goToPage: (page: number) => void; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ page: WritableSignal; pageCount: Signal; pageChange: Observable; disabled: WritableSignal; setDisabled: (value: boolean) => void; firstPage: Signal; lastPage: Signal; setPage: (value: number, options?: SetterOptions) => void; setDefaultPage: (value: number) => void; goToPage: (page: number) => void; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ page: WritableSignal; pageCount: Signal; pageChange: Observable; disabled: WritableSignal; setDisabled: (value: boolean) => void; firstPage: Signal; lastPage: Signal; setPage: (value: number, options?: SetterOptions) => void; setDefaultPage: (value: number) => void; goToPage: (page: number) => void; }> | Signal<{ page: WritableSignal; pageCount: Signal; pageChange: Observable; disabled: WritableSignal; setDisabled: (value: boolean) => void; firstPage: Signal; lastPage: Signal; setPage: (value: number, options?: SetterOptions) => void; setDefaultPage: (value: number) => void; goToPage: (page: number) => void; } | null>; }; declare const providePaginationState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; interface NgpPaginationButtonState { /** * Define the page this button represents. */ readonly page: Signal; /** * Whether the button is disabled, accounting for the parent pagination state. */ readonly disabled: Signal; /** * Go to the page this button represents. */ goToPage(): void; } interface NgpPaginationButtonProps { /** * Define the page this button represents. */ readonly page?: Signal; /** * Whether the button is disabled. */ readonly disabled?: Signal; } declare const NgpPaginationButtonStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{ page: Signal; disabled: Signal; goToPage: () => void; }>>; declare const ngpPaginationButton: ({ page, disabled: _disabled, }: NgpPaginationButtonProps) => { page: Signal; disabled: Signal; goToPage: () => void; }; declare const injectPaginationButtonState: { (): Signal<{ page: Signal; disabled: Signal; goToPage: () => void; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ page: Signal; disabled: Signal; goToPage: () => void; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ page: Signal; disabled: Signal; goToPage: () => void; }> | Signal<{ page: Signal; disabled: Signal; goToPage: () => void; } | null>; }; declare const providePaginationButtonState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; interface NgpPaginationFirstState { /** * Whether the button is disabled, accounting for the parent pagination state. */ readonly disabled: Signal; /** * Go to the first page. */ goToFirstPage(): void; } interface NgpPaginationFirstProps { /** * Whether the button is disabled. */ readonly disabled?: Signal; } declare const NgpPaginationFirstStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{ disabled: Signal; goToFirstPage: () => void; }>>; declare const ngpPaginationFirst: ({ disabled: _disabled }: NgpPaginationFirstProps) => { disabled: Signal; goToFirstPage: () => void; }; declare const injectPaginationFirstState: { (): Signal<{ disabled: Signal; goToFirstPage: () => void; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ disabled: Signal; goToFirstPage: () => void; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ disabled: Signal; goToFirstPage: () => void; }> | Signal<{ disabled: Signal; goToFirstPage: () => void; } | null>; }; declare const providePaginationFirstState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; interface NgpPaginationLastState { /** Whether the button is disabled, accounting for the parent pagination state. */ readonly disabled: Signal; /** Go to the last page. */ goToLastPage(): void; } interface NgpPaginationLastProps { /** Whether the button is disabled. */ readonly disabled?: Signal; } declare const NgpPaginationLastStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{ disabled: Signal; goToLastPage: () => void; }>>; declare const ngpPaginationLast: ({ disabled: _disabled }: NgpPaginationLastProps) => { disabled: Signal; goToLastPage: () => void; }; declare const injectPaginationLastState: { (): Signal<{ disabled: Signal; goToLastPage: () => void; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ disabled: Signal; goToLastPage: () => void; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ disabled: Signal; goToLastPage: () => void; }> | Signal<{ disabled: Signal; goToLastPage: () => void; } | null>; }; declare const providePaginationLastState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; interface NgpPaginationNextState { /** Whether the button is disabled, accounting for the parent pagination state. */ readonly disabled: Signal; /** Go to the next page. */ goToNextPage(): void; } interface NgpPaginationNextProps { /** Whether the button is disabled */ readonly disabled?: Signal; } declare const NgpPaginationNextStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{ disabled: Signal; goToNextPage: () => void; }>>; declare const ngpPaginationNext: ({ disabled: _disabled }: NgpPaginationNextProps) => { disabled: Signal; goToNextPage: () => void; }; declare const injectPaginationNextState: { (): Signal<{ disabled: Signal; goToNextPage: () => void; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ disabled: Signal; goToNextPage: () => void; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ disabled: Signal; goToNextPage: () => void; }> | Signal<{ disabled: Signal; goToNextPage: () => void; } | null>; }; declare const providePaginationNextState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; interface NgpPaginationPreviousState { /** * Whether the button is disabled, accounting for the parent pagination state. */ readonly disabled: Signal; /** * Go to the previous page. */ goToPreviousPage(): void; } interface NgpPaginationPreviousProps { /** * Whether the button is disabled. */ readonly disabled?: Signal; } declare const NgpPaginationPreviousStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{ disabled: Signal; goToPreviousPage: () => void; }>>; declare const ngpPaginationPrevious: ({ disabled: _disabled }: NgpPaginationPreviousProps) => { disabled: Signal; goToPreviousPage: () => void; }; declare const injectPaginationPreviousState: { (): Signal<{ disabled: Signal; goToPreviousPage: () => void; }>; (options: ng_primitives_state.StateInjectionOptions): Signal<{ disabled: Signal; goToPreviousPage: () => void; } | null>; (options?: ng_primitives_state.StateInjectionOptions): Signal<{ disabled: Signal; goToPreviousPage: () => void; }> | Signal<{ disabled: Signal; goToPreviousPage: () => void; } | null>; }; declare const providePaginationPreviousState: (opts?: { inherit?: boolean; }) => _angular_core.FactoryProvider; export { NgpPagination, NgpPaginationButton, NgpPaginationButtonStateToken, NgpPaginationFirst, NgpPaginationFirstStateToken, NgpPaginationLast, NgpPaginationLastStateToken, NgpPaginationNext, NgpPaginationNextStateToken, NgpPaginationPrevious, NgpPaginationPreviousStateToken, NgpPaginationStateToken, injectPaginationButtonState, injectPaginationFirstState, injectPaginationLastState, injectPaginationNextState, injectPaginationPreviousState, injectPaginationState, ngpPagination, ngpPaginationButton, ngpPaginationFirst, ngpPaginationLast, ngpPaginationNext, ngpPaginationPrevious, providePaginationButtonState, providePaginationFirstState, providePaginationLastState, providePaginationNextState, providePaginationPreviousState, providePaginationState }; export type { NgpPaginationButtonProps, NgpPaginationButtonState, NgpPaginationFirstProps, NgpPaginationFirstState, NgpPaginationLastProps, NgpPaginationLastState, NgpPaginationNextProps, NgpPaginationNextState, NgpPaginationPreviousProps, NgpPaginationPreviousState, NgpPaginationProps, NgpPaginationState };