import { Injectable } from '@angular/core';
import { AdminProduct } from '../models/admin-product.model';

@Injectable({ providedIn: 'root' })
export class AdminProductsFormFactory {
  createEmpty(): AdminProduct {
    return {
      id: `product-${Date.now()}`,
      name: '',
      slug: '',
      sku: '',
      barcode: '',
      brand: '',
      categoryId: '',
      visible: true,
      archived: false,
      priority: 0,
      media: { images: [], gallery: [], videos: [] },
      price: 0,
      discount: 0,
      currency: 'RUB',
      quantity: 0,
      visits: 0,
      stockStatus: 'in_stock',
      availability: 'in_stock',
      shortDescription: '',
      htmlDescription: '',
      specifications: [],
      attributes: [],
      variantAttributes: [], variants: [],
      relatedProductIds: [],
      translations: { en: {}, ru: {}, hy: {} },
      seo: { metaTitle: '', metaDescription: '', keywords: '' },
      featured: false,
      recommended: false,
      isNew: false,
      bestseller: false,
      badges: [],
      reviews: [],
      questions: [],
      createdAt: new Date().toISOString(),
      updatedAt: new Date().toISOString(),
    };
  }
}
