import { IsNotEmpty, IsUUID, IsIn, MinLength, MaxLength } from 'class-validator';
import { validationMessages } from '../../../messages/validation-messages';
import { ApiProperty } from '@nestjs/swagger';



class PlatformDto {
    @ApiProperty({ example: 'facebook', description: 'The platform value' })
    value: string;

    @ApiProperty({ example: 'Facebook', description: 'The platform label' })
    label: string;
}

class SkillDto {
    @ApiProperty({ example: 'Parenting', description: 'The skill label' })
    label: string;

    @ApiProperty({ example: '93da78aa-4ace-4d04-ac3c-c48e93b92ce2', description: 'The skill unique identifier' })
    value: string;
}

class CountryDto {
    @ApiProperty({ example: 'los-angeles', description: 'The city value' })
    value: string;

    @ApiProperty({ example: 'Los Angeles', description: 'The city label' })
    label: string;
}

class FollowerRangeDto {
    @ApiProperty({ example: 120000, description: 'Minimum number of followers' })
    from: number;

    @ApiProperty({ example: 3000000, description: 'Maximum number of followers' })
    to: number;
}

class EngagementRangeDto {
    @ApiProperty({ example: 1.2, description: 'Minimum engagement rate' })
    from: number;

    @ApiProperty({ example: 5.8, description: 'Maximum engagement rate' })
    to: number;
}


class FilteredValueDto {
    @ApiProperty({ type: [PlatformDto], description: 'List of platforms' })
    platforms: PlatformDto[];

    @ApiProperty({ type: [SkillDto], description: 'List of skills' })
    skills: SkillDto[];

    @ApiProperty({ type: [CountryDto], description: 'List of cities' })
    country: CountryDto[];

    @ApiProperty({ example: 'Female', description: 'Gender of the influencer' })
    gender: string;

    @ApiProperty({ type: [FollowerRangeDto], description: 'Follower range' })
    followers: FollowerRangeDto[];

    @ApiProperty({ type: [EngagementRangeDto], description: 'Engagement range' })
    engagement: EngagementRangeDto[];
}


export class InfluencePostDto {
    @ApiProperty({ example: 'beauty', required: false, type: 'string' })
    search: string;

    @ApiProperty({ example: '1', required: true, type: 'number' })
    @IsNotEmpty({ message: validationMessages.common.page_required })
    page: number;

    @ApiProperty({ example: 10, required: false, type: 'integer' })
    per_page: number;

    @ApiProperty({ example: false, required: false, type: 'boolean' })
    is_list_view: boolean;

    @ApiProperty({ example: 'followers', required: false, type: 'string' })
    sort_by: string;

    @ApiProperty({ example: 'ASC', required: false, type: 'string' })
    sort: string;

    @ApiProperty({ example: 'science', required: false, type: 'string' })
    category_slug: string;

    category_id: string;

    @ApiProperty({ type: FilteredValueDto, description: 'Filter criteria' })
    filteredValue: FilteredValueDto;

    language_code: string;

}
