// 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:copy_with_extension/copy_with_extension.dart';
import 'package:wyatt_ui_components/src/domain/entities/entities.dart';
part 'component_theme_data.g.dart';

@CopyWith()
class ComponentThemeData {
  factory ComponentThemeData({
    TopAppBarComponent? appBar,
    TopNavigationBarComponent? topNavigationBarComponent,
    BottomNavigationBarComponent? bottomNavigationBar,
    ErrorWidgetComponent? errorWidget,
    LoadingWidgetComponent? loadingWidget,
    LoaderComponent? loaderComponent,
    RichTextBuilderComponent? richTextBuilderComponent,
    TextInputComponent? textInputComponent,
    FileSelectionButtonComponent? fileSelectionButtonComponent,
    FlatButtonComponent? flatButtonComponent,
    SimpleIconButtonComponent? simpleIconButtonComponent,
    SymbolButtonComponent? symbolButtonComponent,
    InformationCardComponent? informationCardComponent,
    PortfolioCardComponent? portfolioCardComponent,
    QuoteCardComponent? quoteCardComponent,
    SkillCardComponent? skillCardComponent,
  }) =>
      ComponentThemeData.raw(
        appBar: appBar,
        topNavigationBarComponent: topNavigationBarComponent,
        bottomNavigationBar: bottomNavigationBar,
        errorWidget: errorWidget,
        loadingWidget: loadingWidget,
        loaderComponent: loaderComponent,
        richTextBuilderComponent: richTextBuilderComponent,
        textInputComponent: textInputComponent,
        fileSelectionButtonComponent: fileSelectionButtonComponent,
        flatButtonComponent: flatButtonComponent,
        simpleIconButtonComponent: simpleIconButtonComponent,
        symbolButtonComponent: symbolButtonComponent,
        informationCardComponent: informationCardComponent,
        portfolioCardComponent: portfolioCardComponent,
        quoteCardComponent: quoteCardComponent,
        skillCardComponent: skillCardComponent,
      );

  const ComponentThemeData.raw({
    this.appBar,
    this.topNavigationBarComponent,
    this.bottomNavigationBar,
    this.errorWidget,
    this.loadingWidget,
    this.loaderComponent,
    this.richTextBuilderComponent,
    this.textInputComponent,
    this.fileSelectionButtonComponent,
    this.flatButtonComponent,
    this.simpleIconButtonComponent,
    this.symbolButtonComponent,
    this.informationCardComponent,
    this.portfolioCardComponent,
    this.quoteCardComponent,
    this.skillCardComponent,
  });

  final TopAppBarComponent? appBar;

  final TopNavigationBarComponent? topNavigationBarComponent;
  final BottomNavigationBarComponent? bottomNavigationBar;
  final ErrorWidgetComponent? errorWidget;
  final LoadingWidgetComponent? loadingWidget;
  final LoaderComponent? loaderComponent;

  final RichTextBuilderComponent? richTextBuilderComponent;
  final TextInputComponent? textInputComponent;

  // Buttons
  final FileSelectionButtonComponent? fileSelectionButtonComponent;
  final FlatButtonComponent? flatButtonComponent;
  final SimpleIconButtonComponent? simpleIconButtonComponent;
  final SymbolButtonComponent? symbolButtonComponent;

  // Cards
  final InformationCardComponent? informationCardComponent;
  final PortfolioCardComponent? portfolioCardComponent;
  final QuoteCardComponent? quoteCardComponent;
  final SkillCardComponent? skillCardComponent;
}
