import { Component } from '@angular/core';
import { FindService, TAlignment, TConfig, TypeFind } from 'synapse-primeng';

@Component({
  selector: 'cp-{1}',
  templateUrl: './{1}.component.html',
  styleUrls: ['./{1}.component.scss']
})
export class {0}Component {
    buscaAtiva: boolean = false;
    constructor(
        private findService: FindService
    ) { }

    ngOnDestroy() {
        this.findService.empty('{1}')
    }

    ngOnInit(): void {
        this.findService.setFieldsFind('{1}', [
            {
                label: 'Nome', value: 'nome', operations: [
                    TypeFind.Contenha,
                    TypeFind.IniciandoCom,
                    TypeFind.FinalizandoCom
                ],
                operationdefault: TypeFind.Contenha
            },
        ])
        this.findService.setFieldsResult('{1}', [
            {
                label: 'Nome',
                value: 'nome',
                size: 'auto',
                config: TConfig.None,
                contentAlignment: TAlignment.Left,
                headerAlignment: TAlignment.Left
            }
        ])
    }

    novo() { }
    salvar() { }
    remover() { }
    recuperar(value) { }
    buscar(value) {
    }
    selecionar(value) { }
}
