import {
	IMAGE_LIBRARY_LOADED,
	STOCK_IMAGES_LOADED,
	IMAGE_FOLDER_UPDATED,
	SAVE_IMAGE_POSITION,
} from "./types";

export const stockImagesLoaded = (images) => {
	return {
		type: STOCK_IMAGES_LOADED,
		payload: images,
	};
};

export const imageLibraryLoaded = (library) => {
	return {
		type: IMAGE_LIBRARY_LOADED,
		payload: library,
	};
};

export const imageFolderUpdated = (folder) => {
	return {
		type: IMAGE_FOLDER_UPDATED,
		payload: folder,
	};
};

export const saveImagePosition = (uri, positions) => {
	return {
		type: SAVE_IMAGE_POSITION,
		payload: { uri, positions },
	};
};
