import 'package:design/design.dart';
import 'package:design_spec/design_spec.dart';

part 'rating_design_spec.g.dart';

@DesignSpec(width: 750, height: 1624)
abstract class RatingDesignSpec implements BasicDesignSpec {
  @NestedAspectSpec(654 / 660, 0.872, widthUpperLimit: 400)
  RatingDialogStep1DesignSpec get step1DialogSpec;

  @NestedAspectSpec(654 / 805, 0.872, widthUpperLimit: 400)
  RatingDialogStep2DesignSpec get step2DialogSpec;

  @NestedAspectSpec(453 / 296, 0.604, widthUpperLimit: 400)
  GoingStoreLoadingDesignSpec get goingStoreSpec;

  static RatingDesignSpec get() => _RatingDesignSpec.get();
}

@DesignSpec(width: 654.0, height: 660.0, nestedSpec: true)
abstract class RatingDialogStep1DesignSpec implements BasicDesignSpec {
  @SpecRadius.circular(SpecHeight(40))
  BorderRadius get radius;

  @SpecHeight(40)
  double get closeIconTopSpacing;

  @SpecWidth(32.0)
  double get closeIconStartSpacing;

  @SpecHeight(24.0)
  double get closeIconInkRadius;

  @SpecHeight(48.0)
  double get closeIconSize;

  @SpecSize(SpecWidth(528.0), SpecHeight(320.0))
  Size get imageAreaSize;

  @SpecSize(SpecWidth(368.0), SpecHeight(256.0))
  Size get imageSize;

  @SpecHeight(56)
  double get imageTopSpace;

  @SpecHeight(40)
  double get titleTopSpacing;

  @SpecFontSize(36)
  double get titleFontSize;

  @SpecHeight(50)
  double get ratingStartTopSpacing;

  @SpecHeight(124)
  double get ratingStartBottomSpacing;

  @SpecHeight(64)
  double get ratingItemSize;

  @SpecHeight(8)
  double get bottomMargin;

  static RatingDialogStep1DesignSpec create(Size measuredSize, {Offset offset = Offset.zero}) =>
      _RatingDialogStep1DesignSpec._create(measuredSize, offset: offset);
}

@DesignSpec(width: 654.0, height: 805.0, nestedSpec: true)
abstract class RatingDialogStep2DesignSpec implements BasicDesignSpec {
  @SpecFontSize(36)
  double get titleFontSize;

  @SpecHeight(6)
  double get summaryTopSpacing;

  @SpecWidth(542)
  double get summaryMaxWidth;

  @SpecFontSize(24)
  double get summaryFontSize;

  @SpecHeight(32)
  double get ratingStartTopSpacing;

  @SpecHeight(44)
  double get editorBarTopSpacing;

  @SpecSize(SpecWidth(542), SpecHeight(208))
  Size get editorBarSize;

  @SpecEdgeInsets.symmetric(horizontal: SpecWidth(40), vertical: SpecHeight(6))
  EdgeInsets get editorBarPadding;

  @SpecRadius.circular(SpecHeight(24))
  BorderRadius get editorBarRadius;

  @SpecFontSize(28)
  double get editorTextSize;

  @SpecHeight(48)
  double get submitTopSpacing;

  @SpecHeight(80)
  double get submitBottomSpacing;

  @SpecSize(SpecWidth(542.0), SpecHeight(96))
  Size get submitButtonSize;

  @SpecRadius.circular(SpecHeight(80))
  BorderRadius get submitButtonRadius;

  @SpecFontSize(32)
  double get submitButtonTextSize;

  static RatingDialogStep2DesignSpec create(Size measuredSize, {Offset offset = Offset.zero}) =>
      _RatingDialogStep2DesignSpec._create(measuredSize, offset: offset);
}

@DesignSpec(width: 453.0, height: 296.0, nestedSpec: true)
abstract class GoingStoreLoadingDesignSpec implements BasicDesignSpec {
  static GoingStoreLoadingDesignSpec create(Size measuredSize, {Offset offset = Offset.zero}) =>
      _GoingStoreLoadingDesignSpec._create(measuredSize, offset: offset);
}
