package request

import shareddto "wucher/internal/transport/http/dto/shared"

type AirRescuerChecklistCreateEntry struct {
	ScopeCode string                                   `json:"scope_code" validate:"required" example:"MO"`
	Title     string                                   `json:"title" validate:"required" example:"Monday Checklist"`
	Position  *int                                     `json:"position,omitempty" example:"1"`
	Items     []shareddto.AirRescuerChecklistItemInput `json:"items,omitempty" validate:"omitempty,dive"`
}

type AirRescuerChecklistCreateAttributes struct {
	BaseID     string                           `json:"base_id" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Checklists []AirRescuerChecklistCreateEntry `json:"checklists" validate:"required,min=1,dive"`
}

type AirRescuerChecklistCreateData struct {
	Type       string                              `json:"type" validate:"required,oneof=air_rescuer_checklist_create"`
	Attributes AirRescuerChecklistCreateAttributes `json:"attributes" validate:"required"`
}

type AirRescuerChecklistCreateRequest struct {
	Data AirRescuerChecklistCreateData `json:"data" validate:"required"`
}

type AirRescuerChecklistUpdateAttributes struct {
	ScopeCode *string                                  `json:"scope_code,omitempty" example:"MO"`
	Title     *string                                  `json:"title,omitempty" example:"Monday Checklist Updated"`
	Position  *int                                     `json:"position,omitempty" example:"1"`
	NewItems  []shareddto.AirRescuerChecklistItemInput `json:"new_items,omitempty" validate:"omitempty,dive"`
}

type AirRescuerChecklistUpdateData struct {
	Type       string                              `json:"type" validate:"required,oneof=air_rescuer_checklist_update"`
	ID         string                              `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes AirRescuerChecklistUpdateAttributes `json:"attributes" validate:"required"`
}

type AirRescuerChecklistUpdateRequest struct {
	Data AirRescuerChecklistUpdateData `json:"data" validate:"required"`
}

type AirRescuerChecklistItemCreateAttributes struct {
	Items []shareddto.AirRescuerChecklistItemInput `json:"items" validate:"required,min=1,dive"`
}

type AirRescuerChecklistItemCreateData struct {
	Type       string                                  `json:"type" validate:"required,oneof=air_rescuer_checklist_item_create"`
	Attributes AirRescuerChecklistItemCreateAttributes `json:"attributes" validate:"required"`
}

type AirRescuerChecklistItemCreateRequest struct {
	Data AirRescuerChecklistItemCreateData `json:"data" validate:"required"`
}

type AirRescuerChecklistItemUpdateAttributes struct {
	Name     *string `json:"name,omitempty" example:"Check radio"`
	Position *int    `json:"position,omitempty" example:"2"`
}

type AirRescuerChecklistItemUpdateData struct {
	Type       string                                  `json:"type" validate:"required,oneof=air_rescuer_checklist_item_update"`
	ID         string                                  `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes AirRescuerChecklistItemUpdateAttributes `json:"attributes" validate:"required"`
}

type AirRescuerChecklistItemUpdateRequest struct {
	Data AirRescuerChecklistItemUpdateData `json:"data" validate:"required"`
}

type AirRescuerChecklistItemReorderEntry struct {
	ItemUUID string `json:"item_uuid" validate:"required" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Position *int   `json:"position" validate:"required" example:"2"`
}

type AirRescuerChecklistItemReorderAttributes struct {
	Items []AirRescuerChecklistItemReorderEntry `json:"items" validate:"required,min=1,dive"`
}

type AirRescuerChecklistItemReorderData struct {
	Type       string                                   `json:"type" validate:"required,oneof=air_rescuer_checklist_item_reorder"`
	Attributes AirRescuerChecklistItemReorderAttributes `json:"attributes" validate:"required"`
}

type AirRescuerChecklistItemReorderRequest struct {
	Data AirRescuerChecklistItemReorderData `json:"data" validate:"required"`
}
