import {Component, Input} from '@angular/core';
import {CommonModule} from '@angular/common';

export type ButtonKind = '' | 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger';

@Component({
  selector: 'app-main-button',
  imports: [CommonModule],
  template: `
    <button class="is-{{kind}}">

      @if (icon) {
        <i class="ri ri-{{icon}}"></i>
      }
      <span class="label">

        {{ label }}
      </span>
    </button>
  `,
  styleUrl: './main-button.scss'
})
export class MainButton {

  @Input() label: string = '';
  @Input() icon: string = '';
  @Input() kind: ButtonKind = '';
}
