// Copyright (C) 2023 WYATT GROUP
// Please see the AUTHORS file for details.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

import 'package:flutter/widgets.dart';
import 'package:wyatt_ui_components/src/core/utils/multi_color.dart';
import 'package:wyatt_ui_components/src/domain/entities/theme_style.dart';

abstract class ButtonStyle<T> extends ThemeStyle<T> {
  const ButtonStyle({
    this.radius,
    this.padding,
    this.foregroundColors,
    this.backgroundColors,
    this.borderColors,
    this.stroke,
    this.shadow,
  });

  /// Button radius
  ///
  /// Default to `BorderRadius.all(Radius.circular(4.0))`
  final BorderRadiusGeometry? radius;

  /// Padding and gaps of this button
  ///
  /// Default to `ButtonTheme.padding`
  final EdgeInsetsGeometry? padding;

  /// Button foreground gradient colors (from left to right)
  ///
  /// Default to `Theme.colorScheme.onPrimary`
  final MultiColor? foregroundColors;

  /// Button background gradient colors (from left to right)
  ///
  /// Default to `Theme.colorScheme.primary`
  final MultiColor? backgroundColors;

  /// Border colors (from left to right).
  ///
  /// Default to `null`
  final MultiColor? borderColors;

  /// Stroke of the border
  ///
  /// Default to `null`
  final double? stroke;

  /// Drop shadow
  ///
  /// Default to `null`
  final BoxShadow? shadow;

  @override
  String toString() =>
      'ButtonStyle(radius: $radius, padding: $padding, foregroundColors: '
      '$foregroundColors, backgroundColors: $backgroundColors, borderColors: '
      '$borderColors, stroke: $stroke, shadow: $shadow)';
}
