package photos

import "fmt"

var errAccessDenied = fmt.Errorf("photos access denied: grant Full Disk Access or Photos permission in System Settings > Privacy & Security")
var errBridgeNil = fmt.Errorf("bridge returned nil")

func RequestAccess() error { return DefaultBridge.RequestAccess() }

func ListAlbums() ([]Album, error) { return DefaultBridge.ListAlbums() }

func ListAssets(albumID string) ([]Asset, int, error) { return DefaultBridge.ListAssets(albumID) }

func ListTree() ([]CollectionNode, error) { return DefaultBridge.ListTree() }

func ExportAlbumPreviews(albumID, outputDir string, targetSize int) (int, error) {
	return DefaultBridge.ExportAlbumPreviews(albumID, outputDir, targetSize)
}

func ExportAlbumOriginals(albumID, outputDir string) (int, error) {
	return DefaultBridge.ExportAlbumOriginals(albumID, outputDir)
}

func BackupAll(outputDir string, targetSize int, originals bool) (int, error) {
	return DefaultBridge.BackupAll(outputDir, targetSize, originals)
}

func Cancel() { DefaultBridge.Cancel() }

func ExportPreview(assetID, outputDir string, targetSize, index int) (ExportResult, error) {
	return DefaultBridge.ExportPreview(assetID, outputDir, targetSize, index)
}

func ExportOriginal(assetID, outputDir string, index int) (ExportResult, error) {
	return DefaultBridge.ExportOriginal(assetID, outputDir, index)
}
