"""
Экспорт всех представлений для обратной совместимости с urls.py.
Позволяет использовать импорты вида: from products.views import ProductListView
"""

# Утилиты
from .utils import validate_photo, handle_photos

# Управление фотографиями (Product)
from .photo_management import (
    product_photo_delete,
    product_photo_set_main,
    product_photo_move_up,
    product_photo_move_down,
    product_photos_delete_bulk,
)

# Управление фотографиями (ProductKit)
from .photo_management import (
    productkit_photo_delete,
    productkit_photo_set_main,
    productkit_photo_move_up,
    productkit_photo_move_down,
    productkit_photos_delete_bulk,
)

# Управление фотографиями (Category)
from .photo_management import (
    category_photo_delete,
    category_photo_set_main,
    category_photo_move_up,
    category_photo_move_down,
)

# CRUD представления для Product
from .product_views import (
    ProductListView,
    ProductCreateView,
    ProductDetailView,
    ProductUpdateView,
    ProductDeleteView,
    CombinedProductListView,
)

# Импорт товаров
from .product_import_views import (
    product_import_view,
    product_import_status_view,
    product_import_status_api,
    download_import_errors,
)

# CRUD представления для ProductKit
from .productkit_views import (
    ProductKitListView,
    ProductKitCreateView,
    ProductKitDetailView,
    ProductKitUpdateView,
    ProductKitDeleteView,
    ProductKitMakePermanentView,
)

# CRUD представления для Category
from .category_views import (
    TreeItem,
    ProductCategoryListView,
    ProductCategoryCreateView,
    ProductCategoryDetailView,
    ProductCategoryUpdateView,
    ProductCategoryDeleteView,
)

# CRUD представления для ProductVariantGroup
from .variant_group_views import (
    ProductVariantGroupListView,
    ProductVariantGroupCreateView,
    ProductVariantGroupDetailView,
    ProductVariantGroupUpdateView,
    ProductVariantGroupDeleteView,
    product_variant_group_item_move,
)

# CRUD представления для ProductTag
from .tag_views import (
    ProductTagListView,
    ProductTagCreateView,
    ProductTagDetailView,
    ProductTagUpdateView,
    ProductTagDeleteView,
)

# CRUD представления для ConfigurableProduct
from .configurableproduct_views import (
    ConfigurableProductListView,
    ConfigurableProductCreateView,
    ConfigurableProductDetailView,
    ConfigurableProductUpdateView,
    ConfigurableProductDeleteView,
    add_option_to_configurable,
    remove_option_from_configurable,
    set_option_as_default,
)

# CRUD представления для ProductAttribute (справочник атрибутов)
from .attribute_views import (
    ProductAttributeListView,
    ProductAttributeCreateView,
    ProductAttributeDetailView,
    ProductAttributeUpdateView,
    ProductAttributeDeleteView,
    create_attribute_api,
    add_attribute_value_api,
    delete_attribute_value_api,
    get_attributes_list_api,
)

# API представления
from .api_views import (
    search_products_and_variants,
    validate_kit_cost,
    create_temporary_kit_api,
    create_tag_api,
    RandomBouquetNamesView,
    GenerateBouquetNamesView,
)

# Каталог
from .catalog_views import CatalogView

# Управление единицами измерения
from .uom_views import (
    unit_of_measure_list,
    unit_of_measure_create,
    unit_of_measure_update,
    unit_of_measure_delete,
    product_sales_unit_list,
    product_sales_unit_create,
    product_sales_unit_update,
    product_sales_unit_delete,
)


__all__ = [
    # Утилиты
    'validate_photo',
    'handle_photos',

    # Управление фотографиями Product
    'product_photo_delete',
    'product_photo_set_main',
    'product_photo_move_up',
    'product_photo_move_down',
    'product_photos_delete_bulk',

    # Управление фотографиями ProductKit
    'productkit_photo_delete',
    'productkit_photo_set_main',
    'productkit_photo_move_up',
    'productkit_photo_move_down',
    'productkit_photos_delete_bulk',

    # Управление фотографиями Category
    'category_photo_delete',
    'category_photo_set_main',
    'category_photo_move_up',
    'category_photo_move_down',

    # Product CRUD
    'ProductListView',
    'ProductCreateView',
    'ProductDetailView',
    'ProductUpdateView',
    'ProductDeleteView',
    'CombinedProductListView',

    # Product Import/Export
    'product_import_view',
    'download_import_errors',

    # ProductKit CRUD
    'ProductKitListView',
    'ProductKitCreateView',
    'ProductKitDetailView',
    'ProductKitUpdateView',
    'ProductKitDeleteView',
    'ProductKitMakePermanentView',

    # Category CRUD
    'TreeItem',
    'ProductCategoryListView',
    'ProductCategoryCreateView',
    'ProductCategoryDetailView',
    'ProductCategoryUpdateView',
    'ProductCategoryDeleteView',

    # ProductVariantGroup CRUD
    'ProductVariantGroupListView',
    'ProductVariantGroupCreateView',
    'ProductVariantGroupDetailView',
    'ProductVariantGroupUpdateView',
    'ProductVariantGroupDeleteView',
    'product_variant_group_item_move',

    # ProductTag CRUD
    'ProductTagListView',
    'ProductTagCreateView',
    'ProductTagDetailView',
    'ProductTagUpdateView',
    'ProductTagDeleteView',

    # ConfigurableProduct CRUD
    'ConfigurableProductListView',
    'ConfigurableProductCreateView',
    'ConfigurableProductDetailView',
    'ConfigurableProductUpdateView',
    'ConfigurableProductDeleteView',
    'add_option_to_configurable',
    'remove_option_from_configurable',
    'set_option_as_default',

    # ProductAttribute CRUD
    'ProductAttributeListView',
    'ProductAttributeCreateView',
    'ProductAttributeDetailView',
    'ProductAttributeUpdateView',
    'ProductAttributeDeleteView',
    'create_attribute_api',
    'add_attribute_value_api',
    'delete_attribute_value_api',
    'get_attributes_list_api',

    # API
    'search_products_and_variants',
    'validate_kit_cost',
    'create_temporary_kit_api',
    'create_tag_api',
    'RandomBouquetNamesView',
    'GenerateBouquetNamesView',

    # Каталог
    'CatalogView',

    # Управление единицами измерения
    'unit_of_measure_list',
    'unit_of_measure_create',
    'unit_of_measure_update',
    'unit_of_measure_delete',
    'product_sales_unit_list',
    'product_sales_unit_create',
    'product_sales_unit_update',
    'product_sales_unit_delete',
]
