import { IGenericAttachments } from "../../../generic/types";
import { MSDynamicsAttachment } from "../../types";

export const transformFileUpload = (attachments: Array<MSDynamicsAttachment>): IGenericAttachments => ({
    type: "attachments",
    props: {
        value: {
            staticValue: attachments.map(attachment => {
                return {
                    text: attachment.url
                };
            })
        }
    }
});
