import { AfterContentInit, OnChanges, SimpleChange, ViewContainerRef, Renderer } from '@angular/core';
import { Router } from '@angular/router';
import { ThfPageAction, ThfPageDefaultBaseComponent } from '@totvs/thf-core/components/thf-page-base';
/**
* @extends ThfPageDefaultBaseComponent
*
* @example
*
*
*
*
*
*
*
*
*
*
*
* import { Component } from '@angular/core';
* import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
*
* import { ThfNotificationService } from '@totvs/thf-web/services/thf-notification/thf-notification.service';
* import { ThfToasterOrientation } from '@totvs/thf-core/services/thf-notification-base/thf-toaster-base/thf-toaster-orientation.enum';
*
* @Component({
* selector: 'sample-thf-page-default-labs',
* templateUrl: './sample-thf-page-default-labs.component.html'
* })
* export class SampleThfPageDefaultLabsComponent {
* title = 'THF Page Default Labs';
* button = {
* label: undefined,
* action: undefined,
* icon: undefined
* };
*
* iconList = [
* { value: 'thf-icon-copy', label: 'Copiar' },
* { value: 'thf-icon-delete', label: 'Deletar' },
* { value: 'thf-icon-logo-totvs', label: 'Totvs' },
* ];
*
* actions: Array<{}> = [
* { label: 'Compartilhar', action: this.share, icon: 'thf-icon-share' }
* ];
*
* constructor(private thfNotification: ThfNotificationService) {}
*
* newButton() {
* switch (this.button.icon) {
* case 'thf-icon-copy':
* this.button.action = this.copy;
* break;
* case 'thf-icon-delete':
* this.button.action = this.delete;
* break;
* case 'thf-icon-logo-totvs':
* this.button.action = this.totvs;
* }
*
* this.actions.push(Object.assign({}, this.button));
* }
*
* copy () {
* const message = 'Item copiado!';
* const type = 'information';
* this.showMessage(message, type);
* }
*
* delete() {
* const message = 'Item #3 deletado';
* const type = 'warning';
* this.showMessage(message, type);
* }
*
* totvs() {
* const message = 'Somos #Totvers';
* const type = 'information';
* this.showMessage(message, type);
* }
*
* share() {
* const message = 'Compartilhado com sucesso!';
* const type = 'success';
* this.showMessage(message, type);
* }
*
* showMessage(message, type) {
* this.thfNotification[type]({
* message: message,
* orientation: ThfToasterOrientation.Bottom,
* });
* }
*
* }
*
*
*/
export declare class ThfPageDefaultComponent extends ThfPageDefaultBaseComponent implements AfterContentInit, OnChanges {
private viewRef;
private renderer;
private router;
limitPrimaryActions: number;
dropdownActions: Array;
isMobile: boolean;
private maxWidthMobile;
private parentRef;
constructor(viewRef: ViewContainerRef, renderer: Renderer, router: Router);
ngAfterContentInit(): void;
ngOnChanges(changes: {
[propName: string]: SimpleChange;
}): void;
callAction(item: ThfPageAction): void;
private onResize(event);
private setIsMobile();
private setDropdownActions();
}