export const executeCloneArticleOperation = async ({ comId, initialPlacement, data }, articleQuery, scheduler, productDataManager) => {
    const newComId = await scheduler.queueOperation(comId, () => productDataManager.duplicateArticle(comId));
    const { articleId, categories, type, articleNumber, } = articleQuery.getArticleByComId(comId);
    return [
        {
            type: "create",
            comId: newComId,
            articleNumber: articleNumber !== undefined
                ? articleNumber
                : {
                    baseArticleNumber: articleId,
                },
            categories,
            placement: initialPlacement,
            data,
            articleType: type,
        },
    ];
};
