import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

// Response DTOs for rest functionality

export class ConditionReduced {
  @ApiProperty()
  name: string;

  @ApiProperty()
  oldValue: number;

  @ApiProperty()
  newValue: number;
}

export class RestPreviewDto {
  @ApiProperty({ description: 'How much HP will be healed' })
  hpToHeal: number;

  @ApiProperty({ description: 'New HP after healing' })
  hpAfterRest: number;

  @ApiProperty({ description: 'Conditions that will be removed (e.g., Fatigued)' })
  conditionsToRemove: string[];

  @ApiProperty({ description: 'Conditions that will be reduced (e.g., Drained 2 -> 1)' })
  conditionsToReduce: ConditionReduced[];

  @ApiProperty({ description: 'Resources that will be reset to max' })
  resourcesToReset: string[];

  @ApiProperty({ description: 'Whether alchemy items will be reset' })
  alchemyReset: boolean;

  @ApiProperty({ description: 'Number of infused items that will expire' })
  infusedItemsCount: number;
}

export class RestResultDto {
  @ApiProperty({ description: 'HP healed during rest' })
  hpHealed: number;

  @ApiProperty({ description: 'New current HP' })
  hpCurrent: number;

  @ApiProperty({ description: 'Conditions that were removed' })
  conditionsRemoved: string[];

  @ApiProperty({ description: 'Conditions that were reduced' })
  conditionsReduced: ConditionReduced[];

  @ApiProperty({ description: 'Resources that were reset' })
  resourcesReset: string[];

  @ApiProperty({ description: 'Whether alchemy was reset' })
  alchemyReset: boolean;
}
