package com.dynamicwallpaper.model;

import java.io.File;

/**
 * One source image the user added, plus whatever role it plays in the
 * wallpaper being assembled. Not all fields apply to both modes: appearance
 * mode only reads {@link #appearanceRole}, solar mode only reads
 * {@link #altitude}/{@link #azimuth}/reference flags.
 */
public final class WallpaperImage {

    /** Role of an image in Appearance mode. */
    public enum AppearanceRole { UNASSIGNED, LIGHT, DARK }

    private final File file;
    private AppearanceRole appearanceRole = AppearanceRole.UNASSIGNED;
    private double altitude;
    private double azimuth;
    private boolean lightReference;
    private boolean darkReference;

    public WallpaperImage(File file) {
        this.file = file;
    }

    public File file() {
        return file;
    }

    public String name() {
        return file.getName();
    }

    public AppearanceRole appearanceRole() {
        return appearanceRole;
    }

    public void setAppearanceRole(AppearanceRole role) {
        this.appearanceRole = role;
    }

    public double altitude() {
        return altitude;
    }

    public void setAltitude(double altitude) {
        this.altitude = altitude;
    }

    public double azimuth() {
        return azimuth;
    }

    public void setAzimuth(double azimuth) {
        this.azimuth = azimuth;
    }

    public boolean isLightReference() {
        return lightReference;
    }

    public void setLightReference(boolean lightReference) {
        this.lightReference = lightReference;
    }

    public boolean isDarkReference() {
        return darkReference;
    }

    public void setDarkReference(boolean darkReference) {
        this.darkReference = darkReference;
    }
}
