selectedImg = {
switch(imageSelectionMethod) {
case 'default':
return {
name: selectionNames[imageSelect],
url: selectionURLs[imageSelect],
};
case 'file':
return {
name: imageSelect ? imageSelect.name : selectionNames[0],
url: imageSelect ? await Files.url(imageSelect) : selectionURLs[0],
};
case 'url':
return {
name: "`Custom URL`",
url: imageSelect,
};
}
}