package com.utopiaindustries.model.ctp;

public enum BarcodeStickerSize {

    SIZE_1_5_X_3( 3 * 72, 1.5f * 72, 10, 10, 6, 6, 50, 50, 125, 125, 14, 9, 7),
    SIZE_2_X_3( 3 * 72, 2 * 72, 10, 10, 6, 6, 50, 50, 125, 125, 14, 9, 7),
    SIZE_4_X_4( 4 * 72, 4 * 72, 8, 8, 8, 8, 200, 100, 250, 250, 14, 9, 7),
    SIZE_1_75_X_3_5( 3.5f * 72, 1.75f * 72, 10, 10, 6, 6, 50, 50, 125, 125, 14, 9, 7),
    SIZE_4_X_7( 7f * 72, 4f * 72, 10, 10, 6, 6, 50, 50, 125, 125, 14, 9, 7);


    private final float width;
    private final float height;
    private final int marginLeft;
    private final int marginRight;
    private final int marginTop;
    private final int marginBottom;
    private final int imageWidthBarcode;
    private final int imageHeightBarcode;
    private final int imageWidthQrCode;
    private final int imageHeightQrCode;
    private final int textSize;
    private final int textSizeSmall;
    private final int textSizeExtraSmall;

    BarcodeStickerSize(float width, float height, int marginLeft, int marginRight, int marginTop, int marginBottom, int imageWidthBarcode, int imageHeightBarcode, int imageWidthQrCode, int imageHeightQrCode, int textSize, int textSizeSmall, int textSizeExtraSmall) {
        this.width = width;
        this.height = height;
        this.marginLeft = marginLeft;
        this.marginRight = marginRight;
        this.marginTop = marginTop;
        this.marginBottom = marginBottom;
        this.imageWidthBarcode = imageWidthBarcode;
        this.imageHeightBarcode = imageHeightBarcode;
        this.imageWidthQrCode = imageWidthQrCode;
        this.imageHeightQrCode = imageHeightQrCode;
        this.textSize = textSize;
        this.textSizeSmall = textSizeSmall;
        this.textSizeExtraSmall = textSizeExtraSmall;
    }

    public float getWidth() {
        return width;
    }

    public float getHeight() {
        return height;
    }

    public int getMarginLeft() {
        return marginLeft;
    }

    public int getMarginRight() {
        return marginRight;
    }

    public int getMarginTop() {
        return marginTop;
    }

    public int getMarginBottom() {
        return marginBottom;
    }

    public int getImageWidthBarcode() {
        return imageWidthBarcode;
    }

    public int getImageHeightBarcode() {
        return imageHeightBarcode;
    }

    public int getImageWidthQrCode() {
        return imageWidthQrCode;
    }

    public int getImageHeightQrCode() {
        return imageHeightQrCode;
    }

    public int getTextSize() {
        return textSize;
    }

    public int getTextSizeSmall() {
        return textSizeSmall;
    }

    public int getTextSizeExtraSmall() {
        return textSizeExtraSmall;
    }

    public static BarcodeStickerSize getSize(String sizeName ) {
        for ( BarcodeStickerSize stickerSize: values() ) {
            if ( stickerSize.name().equalsIgnoreCase( sizeName ) ) {
                return stickerSize;
            }
        }
        return null;
    }
}
