# pyright: reportPrivateUsage=false
"""Shared mock data fixtures for unit tests.

Each constant is a minimal valid dict for the corresponding Pydantic model.
"""

from typing import Any

# ── Nested helpers ──────────────────────────────────────────────────────────

SETTINGS: dict[str, Any] = {
    "is_variant_operation": False,
    "is_auto_pub_community": False,
    "is_off_localization": False,
    "bg_cover": "",
    "green_mode": 0,
    "lang_code": "en",
    "nsfw_plus": 0,
    "insight": 0,
    "ai_video_auto_play": 0,
    "task_flow_version": "v1",
    "task_image_prompt_switch": 0,
    "use_model_preset_meta_mode": 0,
    "character_push": 0,
    "show_sexy_content": 0,
    "show_eyes": 0,
    "auto_save_artwork": 0,
    "enable_no_download": 0,
    "auto_save_work_flow": 0,
    "enable_community_subscribe": 0,
}

CHARACTER_SETTING: dict[str, Any] = {
    "gpt_model": "gpt-4",
    "functionality_gpt_model": "gpt-4",
    "auto_tts": 0,
    "enable_memory": 0,
    "enable_five_memory": 0,
    "style": "default",
    "full_screen": 0,
    "h5_full_screen": 0,
    "h5_style": "default",
    "hide_bg": 0,
    "h5_hide_bg": 0,
    "h5_hide_continue": 0,
    "enable_stream_chat": 1,
    "default_card": "",
    "gender": "f",
    "is_set_companion_model": 0,
    "is_set_functionality_model": 0,
    "is_set_workflow": 0,
    "on_line_search": 0,
    "workflow_no": "",
    "initiative_chat": 0,
    "immerse_switch": 0,
    "recommend_reply": 0,
    "confirm_guide_msg_id": "",
    "free_model_guide_msg_id": "",
    "auto_play_tts": 0,
    "apply_list_img": "",
}

TASK_RETURN: dict[str, Any] = {
    "sub_status": 0,
    "used": 0,
    "hashrate": 0.0,
    "temp_hashrate": 0.0,
    "free_num": 0,
    "remain_num": 10,
    "is_can_guide": False,
    "task_run_time": 0,
    "task_push_timestamp": 0,
    "task_queue_position": 0,
    "total_queue_position": 0,
}

ESTIMATE_TIME: dict[str, Any] = {"min_time": 5, "max_time": 30, "avg_time": 15.0}

GUIDE_INFO: dict[str, Any] = {
    "id": "g1",
    "is_show": False,
    "title": "",
    "content": "",
    "button": "",
    "media_url": "",
    "url": "",
}

TRY_OUT_LIMIT: dict[str, Any] = {"pattern_20": 5, "pattern_21": 5, "studio": 3}

# ── Search nested ───────────────────────────────────────────────────────────

SEARCH_AUTHOR: dict[str, Any] = {
    "id": "u1",
    "email": "a@b.com",
    "head": "",
    "avatar_frame": "",
    "create_at": 0,
    "name": "A",
    "status": 1,
    "emp_status": 0,
    "guide_status": 0,
    "device_code": "",
    "is_europe": False,
    "adv_platforms": None,
    "lang": "en",
    "lang_code": "en",
}

SEARCH_COVER: dict[str, Any] = {"url": "", "video": "", "width": 1, "height": 1, "nsfw": 0}

SEARCH_STAT: dict[str, Any] = {
    "num_of_like": 0,
    "num_of_collection": 0,
    "num_of_task": 0,
    "num_of_view": 0,
    "num_of_artwork": 0,
    "rating": 0.0,
}

SEARCH_ITEM: dict[str, Any] = {
    "id": "i1",
    "obj_type": 1,
    "sub_obj_type": 0,
    "is_video_has_audio": False,
    "author": SEARCH_AUTHOR,
    "cover": SEARCH_COVER,
    "c_nsfw_level": 0,
    "nsfw_level": 0,
    "stat": SEARCH_STAT,
    "publish_status": 1,
    "status": 1,
    "nsfw": 0,
    "pt": "",
    "create_at": 0,
    "edging": False,
}


# ── Top-level fixtures ──────────────────────────────────────────────────────

ACCOUNT_INFO: dict[str, Any] = {
    "id": "u1",
    "email": "test@test.com",
    "type": "normal",
    "name": "TestUser",
    "head": "",
    "avatar_frame": "",
    "owned_avatar_frame": None,
    "badges": [],
    "verified_badges": [],
    "create_at": 0,
    "settings": SETTINGS,
    "character_setting": CHARACTER_SETTING,
    "guide_status": 0,
    "newbie_guide_status": 0,
    "colleted_cnt": 0,
    "following_cnt": 0,
    "follower_cnt": 0,
    "num_of_total": 0,
    "num_of_timbre": 0,
    "view_cnt": 0,
    "invite_user_code": "",
    "invite_user_num": 0,
    "review": None,
    "c_home": "",
    "is_model_creator": False,
    "enable_ai": True,
    "enable_gf": False,
    "enable_tavern": False,
    "enable_portfolio": False,
    "enable_video": False,
    "enable_palette": False,
    "is_active": True,
    "enable_nsfw_plus": False,
    "is_studio_beta": False,
    "show_lab": False,
    "account_login_channel": 0,
    "role": "user",
    "emp_status": 0,
    "managed_tags": None,
    "collect_tags": None,
    "collect_tag_item": None,
    "post_white": False,
    "apps_flyer_id": "",
    "apps_flyer_adid": "",
    "task_num": 0,
    "guide_pop": False,
    "character_pop": False,
    "is_audit": 0,
    "join_stimulate": 0,
    "system_push": 1,
    "comment_push": 1,
    "like_favorite_push": 1,
    "follow_push": 1,
    "followed_content_push": 1,
    "ai_video_auto_play": 0,
    "enable_comfyui": False,
    "bind_adyen": False,
    "task_expire_day": 7,
    "app_id": "",
    "home_set": None,
    "overview_list": None,
    "can_push_surveys": False,
    "num_of_active": 0,
    "show_evaluation_guide": False,
    "can_show_ad": False,
    "login_app": 0,
    "story_gray": False,
    "is_questionnaire": False,
    "current_country_code": "US",
    "show_download": True,
    "task_flow_gt": "",
    "h5_task_flow_gt": "",
    "show_task_v2_guide": False,
    "show_task_v2_guide_for_h5": False,
    "shot_task_v2_preset_meta_popup": False,
    "is_digital_lang_flow": 0,
    "trial_order_pay_popup": 0,
    "earnings": 0,
    "is_show_video_calculate": False,
    "is_interior": False,
    "show_sexy_button": False,
    "show_nexus_button": False,
    "is_pinterest_share_award": 0,
    "time_zone": "UTC",
    "disable_task_v1_switch": False,
    "is_sdk": False,
    "apply_cn_temp_guide_popup": False,
    "is_cheat_account": False,
    "ad_code_from": "",
    "character_discount": 1.0,
    "ip_country_code": "US",
    "lock_risk": 0,
    "num_of_be_subscribe": 0,
    "num_of_subscribe": 0,
    "risk_type": "",
}

TASK_ITEM: dict[str, Any] = {
    "task_id": "t1",
    "type": 1,
    "sub_type": 0,
    "task_domain_type": 0,
    "process": 100,
    "img_url": "",
    "status": 3,
    "status_desc": "done",
    "sub_status": 0,
    "pub_artwork_no": "",
    "nsfw": 0,
    "category": 0,
    "deduction_detail": {},
    "pub_community": 0,
    "expiration_time": 0,
    "create_at": 0,
    "speed_type": 0,
    "reason": 0,
    "total_num": 1,
    "current_num": 1,
    "task_return": TASK_RETURN,
    "estimate_time": ESTIMATE_TIME,
    "is_show": True,
    "guide_info": GUIDE_INFO,
}

TASK_ITEM_PENDING: dict[str, Any] = {**TASK_ITEM, "status": 1, "process": 50, "status_desc": "pending"}

META: dict[str, Any] = {"width": 512, "height": 512, "steps": 20, "seed": 42}

BANNER: dict[str, Any] = {
    "width": 1,
    "height": 1,
    "url": "",
    "nsfw": 0,
    "is_nsfw_plus": False,
    "cover_url": "",
}

IMAGES_STAT: dict[str, Any] = {
    "num_of_like": 0,
    "num_of_collection": 0,
    "num_of_task": 0,
    "num_of_view": 0,
    "num_of_artwork": 0,
    "rating": 0,
}

ART_MODEL: dict[str, Any] = {
    "id": "m1",
    "banner": BANNER,
    "account_no": "",
    "name": "M",
    "nsfw": 0,
    "model_ver_no": "v1",
    "version_name": "v1",
    "type": "checkpoint",
    "status": 1,
    "stat": IMAGES_STAT,
    "base_model": "SD",
    "publish_status": 1,
    "primary": 1,
    "is_agency_fee": False,
    "agency_fee": 0,
    "payment_way": 0,
    "channel": 0,
    "channel_type": "free",
    "rank_score": 0,
    "is_preset": 0,
    "pre_set_template_id": "",
}

IMG_URI: dict[str, Any] = {
    "id": "img1",
    "width": 512,
    "height": 512,
    "cover_url": "",
    "title": "",
    "is_blur": False,
    "url": "",
    "nsfw": 0,
    "is_nsfw_plus": False,
    "index": 0,
    "expiration_time": 0,
    "is_submit": False,
    "is_saved_personal": False,
    "rembg_x": 0,
    "rembg_y": 0,
    "type": 1,
    "sub_type": 0,
}

NEW_TASK: dict[str, Any] = {
    "id": "nt1",
    "artwork_no": "aw1",
    "type": 1,
    "art_model_no": "m1",
    "art_model_name": "M",
    "art_model_ver_no": "v1",
    "base_model_name": "SD",
    "meta": META,
    "local_prompt": "cat",
    "process": 0,
    "status": 1,
    "status_desc": "queued",
    "create_at": 0,
    "img_uris": None,
    "reverse_prompts": None,
    "reverse_local_prompts": None,
    "channel_id": "",
    "category": 0,
    "deduction_detail": None,
    "pub_community": 0,
    "expiration_time": 0,
    "speed_type": 0,
    "nsfw": 0,
    "pub_artwork_no": "",
    "pub_artwork_nos": None,
    "collect": None,
    "preprocess_images": None,
}

ARTWORK_DETAILS: dict[str, Any] = {
    "id": "aw1",
    "template_id": "",
    "artwork_no": "awn1",
    "type": 1,
    "sub_type": 0,
    "retry_target_type": 0,
    "art_model_no": "m1",
    "art_model_ver_no": "v1",
    "base_model_name": "SD",
    "art_model_name": "M",
    "art_model": ART_MODEL,
    "meta": META,
    "local_prompt": "cat",
    "category": 0,
    "create_at": 0,
    "img_uris": [IMG_URI],
    "status": 1,
    "status_desc": "done",
    "deduction_detail": {},
    "task_domain_type": 0,
    "retry_target_domain_type": 0,
}

TASK_OPERATION_RESULT: dict[str, Any] = {
    "new_task": NEW_TASK,
    "task_return": TASK_RETURN,
}

SEARCH_RESULT: dict[str, Any] = {
    "has_more": False,
    "offset": "0",
    "items": [],
    "search_word_en": "",
    "related_search_words": None,
    "obj_card_list": None,
    "log_via": "",
}

PAYMENT_ACCESS_INFO: dict[str, Any] = {
    "account_id": "u1",
    "is_active": True,
    "lite_is_active": False,
    "big_is_active": False,
    "paid_coins": 0,
    "free_coins": 100,
    "temp_free_coins": 0,
    "temp_coins": 0.0,
    "calculate_coins": 100.0,
    "latest_sub_cp_product_id": "",
    "product_type": 0,
    "product_level": 0,
    "expiry_time": 0,
    "lite_expiry_time": 0,
    "big_expiry_time": 0,
    "moreshort_expiry_time_ms": 0,
    "run_limit": 10,
    "hang_limit": 5,
    "privacy_mode": False,
    "work_delete": False,
    "extra_recharge": False,
    "vip_customer_service": False,
    "temp_coins_expiry_time": 0,
    "show_auto_pub_switch": False,
    "coins_version": 1,
    "try_out_limit": TRY_OUT_LIMIT,
    "max_recharge": 100.0,
    "emp_assets": None,
    "max_out_image": 4,
    "purchase_type": 0,
    "latest_sub_sys_order_id": "",
    "train_run_limit": 0,
    "train_hang_limit": 0,
    "infinite_queue": False,
    "fast_queue_trial_num": 0,
    "palette_limit": 0,
    "forever_save_task": False,
    "vip_type": "free",
    "app_ad_num": 0,
    "every_temp_coins": 0,
    "has_send_welfare": False,
    "is_send_tourist_temp_coins": False,
    "create_at": 0,
    "used_free_month": 0,
    "free_month_end": 0,
    "buff_vip_expiry_time": 0,
    "card_type": "",
    "discount_pop_type": 0,
    "total_recharge": 0.0,
    "stimulate_earnings": 0.0,
    "default_sub_product_id": "",
    "user_type": 0,
    "seen_sub": 0,
    "sub_product_id": "",
    "adyen_client_key": "",
    "country_level": "",
    "country_level_product_id": "",
    "box_free_times": 0,
    "used_special_activity_product_id": "",
    "refund_gift_status": 0,
    "operator_num": 0,
    "product_price_version": "",
    "shop_guide_popup_status": 0,
    "character_vip_expiry_time_ms": 0,
    "payermax_payment_method": "",
    "payermax_payment_method_common": "",
    "card_channel": "",
    "extra_data": {},
}

IMAGE_DOWNLOAD: dict[str, Any] = {"task_id": "t1", "url": "https://cdn.example.com/img.png"}

UPLOADED_IMAGE_URL: dict[str, Any] = {"access_url": "https://cdn.example.com/uploaded.jpg"}
