
import type { DealDraft } from "../../models/DealDraft"
import type { CreateDealRequest } from "../../api/deal/types"

export function mapDealDraftToCreateRequest(
  draft: DealDraft
): CreateDealRequest {
  return {
    title: draft.title,
    description: draft.description,
    price: draft.price,
    imageUrl: draft.imageUrl,

    url: draft.url || undefined,

    sellerName:draft.seller.name
  }
}
