namespace gatewayGK.POSGk
{
    public record operationConfiguration
    {
        public bool forceQuantityInput { get; init; } = false;
        public int pricePositionLimit { get; init; } = 10000; // TODO - controlar este valor, como sacarlo del Smart POS.
        public bool pricePositionZeroAllowed { get; init; } = true;
        public int priceTransactionLimit { get; init; } = -1;
        public int priceDifferencePercentPositionLimit { get; init; } = 100;
        public int priceDifferenceAbsolutePositionLimit { get; init; } = 999999;
        public string priceDifferenceLimitExceedAction { get; init; } = "Warn";
        public string priceNegDifferenceLimitExceedAction { get; init; } = "Warn";
        public string closeCurrent { get; init; } = "Required";
        public string closePrevious { get; init; } = "Required";
        public bool filterResult { get; init; } = true;
        public bool allowedWithWeight { get; init; } = true;
        public bool allowedWithLength { get; init; } = true;
        public bool allowedWithArea { get; init; } = true;
        public bool allowedWithVolume { get; init; } = true;
        public bool allowedWithMeasure { get; init; } = true;
        public int maximumQuantity { get; init; } = 999999;
        public int minimumQuantity { get; init; } = 1;
        public string quantityInputOrder { get; init; } = "BeforeOrAfter";
        public string priceInputOrder { get; init; } = "BeforeOrAfter";
        public string quantityLimitExceedAction { get; init; } = "Warn";
        public string amountLimitExceedAction { get; init; } = "Warn";
        public int weightUnitFactor { get; init; } = 0;
        public int measureUnitFactor { get; init; } = 0;
        public string priceDeviationType { get; init; } = "All";
        public string priceNegDeviationType { get; init; } = "All";
        public string xXCustom08 { get; init; } = "string";
        public string xXCustom10 { get; init; } = "string";
        public string xXCustom09 { get; init; } = "string";
        public string xXCustom07 { get; init; } = "string";
        public string xXCustom05 { get; init; } = "string";
        public string xXCustom06 { get; init; } = "string";
        public string xXCustom11 { get; init; } = "string";
        public string xXCustom12 { get; init; } = "string";
        public string xXCustom13 { get; init; } = "string";
        public string xXCustom14 { get; init; } = "string";
        public string xXCustom15 { get; init; } = "string";
        public string xXCustom03 { get; init; } = "string";
        public string xXCustom02 { get; init; } = "string";
        public string xXCustom04 { get; init; } = "string";
        public string xXCustom01 { get; init; } = "string";
    }

    public record itemEntryConfig
    {
        public bool forceQuantityInput { get; init; } = true;
        public int pricePositionLimit { get; init; } = 0;
        public bool pricePositionZeroAllowed { get; init; } = true;
        public int priceTransactionLimit { get; init; } = 0;
        public int priceDifferencePercentPositionLimit { get; init; } = 0;
        public int priceDifferenceAbsolutePositionLimit { get; init; } = 0;
        public string priceDifferenceLimitExceedAction { get; init; } = "Warn";
        public string priceNegDifferenceLimitExceedAction { get; init; } = "Warn";
        public string closeCurrent { get; init; } = "Required";
        public string closePrevious { get; init; } = "Required";
        public bool filterResult { get; init; } = true;
        public bool allowedWithWeight { get; init; } = true;
        public bool allowedWithLength { get; init; } = true;
        public bool allowedWithArea { get; init; } = true;
        public bool allowedWithVolume { get; init; } = true;
        public bool allowedWithMeasure { get; init; } = true;
        public int maximumQuantity { get; init; } = 0;
        public int minimumQuantity { get; init; } = 0;
        public string quantityInputOrder { get; init; } = "BeforeOrAfter";
        public string priceInputOrder { get; init; } = "BeforeOrAfter";
        public string quantityLimitExceedAction { get; init; } = "Warn";
        public int weightUnitFactor { get; init; } = 0;
        public int measureUnitFactor { get; init; } = 0;
        public string priceDeviationType { get; init; } = "All";
        public string priceNegDeviationType { get; init; } = "All";
        public string xXCustom01 { get; init; } = "string";
        public string xXCustom02 { get; init; } = "string";
        public string xXCustom03 { get; init; } = "string";
        public string xXCustom04 { get; init; } = "string";
        public string xXCustom05 { get; init; } = "string";
        public string xXCustom06 { get; init; } = "string";
        public string xXCustom07 { get; init; } = "string";
        public string xXCustom08 { get; init; } = "string";
        public string xXCustom09 { get; init; } = "string";
        public string xXCustom10 { get; init; } = "string";
        public string xXCustom11 { get; init; } = "string";
        public string xXCustom12 { get; init; } = "string";
        public string xXCustom13 { get; init; } = "string";
        public string xXCustom14 { get; init; } = "string";
        public string xXCustom15 { get; init; } = "string";
    }

    public record registerLineItemReq
    {
        public operationConfiguration operationConfiguration { get; init; } = new operationConfiguration();
        public string barcode { get; init; } = "";
        public bool salesRestrictionsCheckNeeded { get; init; } = false;
        public string priceVariant { get; init; } = "Actual";
        public itemEntryConfig itemEntryConfig { get; init; } = new itemEntryConfig();
        public string entryMethodCode { get; init; } = "Keyed";
        public bool keyedOnline { get; init; } = true;
    }
}
