package response

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

type FileManagerFolderResource struct {
	Type       string                                `json:"type" example:"file_manager_folder"`
	ID         string                                `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes shareddto.FileManagerFolderAttributes `json:"attributes"`
}

type FileManagerFolderResponse struct {
	Data FileManagerFolderResource `json:"data"`
}

type FileManagerFolderDetailResource struct {
	Type       string                                      `json:"type" example:"file_manager_folder"`
	ID         string                                      `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes shareddto.FileManagerFolderDetailAttributes `json:"attributes"`
}

type FileManagerFolderDetailResponse struct {
	Data FileManagerFolderDetailResource `json:"data"`
}

type FileManagerFolderListResponse struct {
	Data []FileManagerFolderResource `json:"data"`
	Meta struct {
		PageNumber int   `json:"page_number" example:"1"`
		PageSize   int   `json:"page_size" example:"20"`
		Total      int64 `json:"total" example:"120"`
	} `json:"meta"`
}

type FileManagerNodeAttributes struct {
	NodeType    string  `json:"node_type" example:"folder"`
	ParentID    *string `json:"parent_id,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name        string  `json:"name" example:"operations"`
	Extension   string  `json:"extension,omitempty" example:"pdf"`
	SizeBytes   int64   `json:"size_bytes,omitempty" example:"1024"`
	MimeType    string  `json:"mime_type,omitempty" example:"application/pdf"`
	DownloadURL string  `json:"download_url,omitempty" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/files/2026/04/05/policy.pdf?X-Amz-Signature=..."`
	Status      string  `json:"status" example:"ready"`
	PathCache   string  `json:"path_cache,omitempty" example:"/root/operations"`
	CreatedAt   string  `json:"created_at,omitempty" example:"2026-03-12T03:04:05Z"`
	UpdatedAt   string  `json:"updated_at,omitempty" example:"2026-03-12T03:04:05Z"`
}

type FileManagerNodeResource struct {
	Type       string                    `json:"type" example:"file_manager_node"`
	ID         string                    `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes FileManagerNodeAttributes `json:"attributes"`
}

type FileManagerNodeListResponse struct {
	Data []FileManagerNodeResource `json:"data"`
	Meta struct {
		ParentUUID *string                     `json:"parent_uuid,omitempty" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
		Breadcrumb []FileManagerBreadcrumbItem `json:"breadcrumb,omitempty"`
		IsRoot     bool                        `json:"is_root" example:"true"`
		Folders    int                         `json:"folders" example:"4"`
		Files      int                         `json:"files" example:"8"`
		Total      int                         `json:"total" example:"12"`
	} `json:"meta"`
}

type FileManagerBreadcrumbItem struct {
	ID   string `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Name string `json:"name" example:"operations"`
}

type FileManagerTrashNodeAttributes struct {
	NodeType    string `json:"node_type" example:"folder"`
	Name        string `json:"name" example:"Documents"`
	Extension   string `json:"extension,omitempty" example:"pdf"`
	SizeBytes   int64  `json:"size_bytes,omitempty" example:"123456"`
	MimeType    string `json:"mime_type,omitempty" example:"application/pdf"`
	DownloadURL string `json:"download_url,omitempty" example:"https://s3.localhost.localstack.cloud:4566/wucher-file-dev/files/2026/04/05/policy.pdf?X-Amz-Signature=..."`
	PathCache   string `json:"path_cache,omitempty" example:"/Documents"`
	TrashedAt   string `json:"trashed_at" example:"2026-04-01T10:00:00Z"`
	CreatedAt   string `json:"created_at,omitempty" example:"2026-03-31T08:52:03Z"`
	UpdatedAt   string `json:"updated_at,omitempty" example:"2026-03-31T08:52:03Z"`
}

type FileManagerTrashNodeResource struct {
	Type       string                         `json:"type" example:"file_manager_trash_node"`
	ID         string                         `json:"id" example:"018f3a5c-7a6f-7c2a-8d4a-4b5b1f6c8e9d"`
	Attributes FileManagerTrashNodeAttributes `json:"attributes"`
}

type FileManagerTrashListResponse struct {
	Data []FileManagerTrashNodeResource `json:"data"`
	Meta struct {
		PageNumber int `json:"page_number" example:"1"`
		PageSize   int `json:"page_size" example:"20"`
		Total      int `json:"total" example:"120"`
		Folders    int `json:"folders" example:"50"`
		Files      int `json:"files" example:"70"`
	} `json:"meta"`
}
