package com.ruansee.macall.testwebview.model;

/**
 * created by:   Macall
 * create time:  2022/11/21 18:16
 * copyright:    @ruansee.com
 * Describe:
 */
public class SelectFileOptions {
    private boolean isCamera;
    private boolean isDCIM;
    private boolean isFileSelection;
    private boolean selfRealization;

    public SelectFileOptions(boolean isCamera) {
        this.isCamera = isCamera;
    }

    public SelectFileOptions(boolean isDCIM, boolean isFileSelection) {
        this.isDCIM = isDCIM;
        this.isFileSelection = isFileSelection;
    }

    public SelectFileOptions(boolean selfRealization, boolean isCamera, boolean isDCIM, boolean isFileSelection) {
        this.selfRealization = selfRealization;
        this.isCamera = isCamera;
        this.isDCIM = isDCIM;
        this.isFileSelection = isFileSelection;
    }
    public void configureOptions(boolean selfRealization,boolean isCamera, boolean isDCIM, boolean isFileSelection) {
        this.selfRealization = selfRealization;
        this.isCamera = isCamera;
        this.isDCIM = isDCIM;
        this.isFileSelection = isFileSelection;
    }

    public boolean isCamera() {
        return isCamera;
    }

    public void setCamera(boolean camera) {
        isCamera = camera;
    }

    public boolean isDCIM() {
        return isDCIM;
    }

    public void setDCIM(boolean DCIM) {
        isDCIM = DCIM;
    }

    public boolean isFileSelection() {
        return isFileSelection;
    }

    public void setFileSelection(boolean fileSelection) {
        isFileSelection = fileSelection;
    }

    public boolean isSelfRealization() {
        return selfRealization;
    }

    public void setSelfRealization(boolean selfRealization) {
        this.selfRealization = selfRealization;
    }

    public boolean onlyOneItemIsSelected(){
        int count = 0;
        if (isCamera){
            count++;
        }
        if (isDCIM){
            count++;
        }
        if (isFileSelection){
            count++;
        }
        return count==1;
    }
}
