/**
 * This function filters the photos based on the camera type and subject type.
 *
 * @param photos A list of dictionaries where each dictionary represents a photo.
 * @param cameraType The type of camera used to capture the photos.
 * @param subjectType The type of subject in the photos.
 * @return A list of filtered photos based on the provided camera type and subject type.
 */
fun filterPhotos(photos: List<Map<String, String>>, cameraType: String, subjectType: String): List<Map<String, String>> {

    val filteredPhotos = mutableListOf<Map<String, String>>()
    for (photo in photos) {
        if (photo["camera_type"] == cameraType && photo["subject_type"] == subjectType) {
            filteredPhotos.add(photo)
        }
    }
    return filteredPhotos
}

// Example usage
val photos = listOf(
    mapOf("id" to "1", "camera_type" to "DSLR", "subject_type" to "portrait"),
    mapOf("id" to "2", "camera_type" to "Mirrorless", "subject_type" to "landscape"),
    mapOf("id" to "3", "camera_type" to "DSLR", "subject_type" to "landscape"),
    mapOf("id" to "4", "camera_type" to "Mirrorless", "subject_type" to "portrait")
)

val filteredPhotos = filterPhotos(photos, "DSLR", "portrait")
/**
 * This function filters the photos based on the camera type and subject type.
 *
 * @param photos A list of dictionaries where each dictionary represents a photo.
 * @param cameraType The type of camera used to capture the photos.
 * @param subjectType The type of subject in the photos.
 * @return A list of filtered photos based on the provided camera type and subject type.
 */
fun filterPhotos(photos: List<Map<String, String>>, cameraType: String, subjectType: String): List<Map<String, String>> {
/**
 * This function filters the photos based on the camera type and subject type.
 *
 * @param photos A list of dictionaries where each dictionary represents a photo.
 * @param cameraType The type of camera used to capture the photos.
 * @param subjectType The type of subject in the photos.
 * @return A list of filtered photos based on the provided camera type and subject type.
 */
fun filterPhotos(photos: List<Map<String, String>>, cameraType: String, subjectType: String): List<Map<String, String>> {

    val filteredPhotos = mutableListOf<Map<String, String>>()
    for (photo in photos) {
        if (photo["camera_type"] == cameraType && photo["subject_type"] == subjectType) {
            filteredPhotos.add(photo)
        }
    }
    return filteredPhotos
}

// Example usage
val photos = listOf(
    mapOf("id" to "1", "camera_type" to "DSLR", "subject_type" to "portrait"),
    mapOf("id" to "2", "camera_type" to "Mirrorless", "subject_type" to "landscape"),
    mapOf("id" to "3", "camera_type" to "DSLR", "subject_type" to "landscape"),
    mapOf("id" to "4", "camera_type" to "Mirrorless", "subject_type" to "portrait")
)

val filteredPhotos = filterPhotos(photos, "DSLR", "portrait")