import moment from "moment";
import { u as useAuth } from "./useAuth-CEQTm2rv.esm.js";
import _ from "lodash";
import { getCountries } from "libphonenumber-js";
import { useMemo, useCallback, useState, useRef, useEffect } from "react";
import { o as checkSkuAndItemName, p as checkUniqueFields } from "./common-B0qL-cCR.esm.js";
import { D as DEFAULT_LANG } from "./pathname.rental-VYOFVGX6.esm.js";
import { u as useERPUI } from "./ERPUIProvider-BAD1kSyl.esm.js";
import { c as calculateAdditionalDiscountCrossValue } from "./translations-3awnZui-.esm.js";
const createStub = (name) => () => {
  console.warn(`${name} is not implemented. This function should be provided by the consuming application.`);
  return Promise.resolve([]);
};
const getAgreement = createStub("getAgreement");
const getBins = createStub("getBins");
const getCategoryItems = createStub("getCategoryItems");
const getChartOfAccounts = createStub("getChartOfAccounts");
const getCompanies = createStub("getCompanies");
const getCurrency = createStub("getCurrency");
const getCustomerSegments = createStub("getCustomerSegments");
const getDepartments = createStub("getDepartments");
const getDiscountedItems = createStub("getDiscountedItems");
const getIncoTerms = createStub("getIncoTerms");
const getItems = createStub("getItems");
const getLocation = createStub("getLocation");
const getParties = createStub("getParties");
const getPartiesIndustry = createStub("getPartiesIndustry");
const getPaymentTerm = createStub("getPaymentTerm");
const getPurchaseInvoices = createStub("getPurchaseInvoices");
const getPurchaseOrderReceipts = createStub("getPurchaseOrderReceipts");
const getPurchaseRepresentatives = createStub("getPurchaseRepresentatives");
const getSalesPerason = createStub("getSalesPerason");
const getShippingRules = createStub("getShippingRules");
const getTaxTemplate = createStub("getTaxTemplate");
const getUoms = createStub("getUoms");
const formatNumber = (num, defaultCurrencySymbol = "$") => {
  if (num >= 1e6) {
    return `${defaultCurrencySymbol} ${(num / 1e6).toFixed(1)} M`;
  } else if (num >= 1e5) {
    return `${defaultCurrencySymbol} ${(num / 1e5).toFixed(1)} L`;
  } else if (num >= 1e3) {
    return `${(num / 1e3).toFixed(1)} K`;
  } else {
    return `${defaultCurrencySymbol} ${num.toFixed(2)}`;
  }
};
function formateDate(date, format = "DD-MM-YYYY") {
  console.log("date", date);
  if (!date) {
    return;
  }
  return moment(date).format(format);
}
function capitalizeWords(str) {
  return str ? str.split(" ").map(
    (word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
  ).join(" ") : "";
}
const defaultUserCurrency = () => {
  var _a;
  const { user } = useAuth();
  return ((_a = user == null ? void 0 : user.currency_data) == null ? void 0 : _a.symbol) || "";
};
const valueWithCurrency = (value) => {
  var _a;
  const { user } = useAuth();
  if (!value) {
    return;
  }
  return `${((_a = user == null ? void 0 : user.currency_data) == null ? void 0 : _a.symbol) || ""} ${value}`;
};
const sortData = (data, key, direction) => {
  const formatedData = _.orderBy(data, key, direction);
  return formatedData;
};
function recursiveSort(data, nestedKeys, header, direction) {
  console.log(data, nestedKeys, header, direction);
  if (!nestedKeys.length) return sortData(data, header, direction);
  const [currentKey, ...remainingKey] = nestedKeys;
  return data == null ? void 0 : data.map((item) => {
    return {
      ...item,
      [currentKey]: recursiveSort(
        item[currentKey],
        remainingKey || [],
        header,
        direction
      )
    };
  });
}
function formatTime(isoString, format = "HH:mm:ss") {
  if (!isoString) {
    return;
  }
  const date = new Date(isoString);
  const padZero = (num) => (num < 10 ? "0" : "") + num;
  const hours = date.getHours();
  const minutes = date.getMinutes();
  const seconds = date.getSeconds();
  if (format === "HH:mm:ss") {
    return `${padZero(hours)}:${padZero(minutes)}:${padZero(seconds)}`;
  }
  if (format === "HH:mm") {
    return `${padZero(hours)}:${padZero(minutes)}`;
  }
  if (format === "hh:mm A") {
    const period = hours >= 12 ? "PM" : "AM";
    const twelveHour = hours % 12 || 12;
    return `${padZero(twelveHour)}:${padZero(minutes)} ${period}`;
  }
  return date.toTimeString().slice(0, 8);
}
function convertEmptyToNull(obj) {
  return Object.entries(obj).reduce((acc, [key, value]) => {
    if (value === "" || Array.isArray(value) && value.length === 0 || typeof value === "object" && value !== null && !Array.isArray(value) && // Prevent arrays from being treated as objects
    Object.keys(value).length === 0) {
      acc[key] = null;
    } else if (Array.isArray(value)) {
      acc[key] = value.map(
        (item) => typeof item === "object" && item !== null ? convertEmptyToNull(item) : item
      );
    } else if (typeof value === "object" && value !== null) {
      acc[key] = convertEmptyToNull(value);
    } else {
      acc[key] = value;
    }
    return acc;
  }, {});
}
function checkPattern(i, pattern) {
  return pattern.some((obj) => i.includes(obj));
}
function removeExtraKeys(data, extraKeys = []) {
  const pattern = [
    "_at",
    "_by",
    "_data",
    "created_user",
    "updated_user",
    ...extraKeys
  ];
  for (const i in data) {
    if (checkPattern(i, pattern)) {
      delete data[i];
    } else if (typeof data[i] === "object" && !Array.isArray(data[i])) {
      removeExtraKeys(data[i], ["_at", "_by", "_data"]);
    }
  }
  return data;
}
const apiType = {
  company: getCompanies,
  items: getItems,
  currency: getCurrency,
  salesperson: getSalesPerason,
  party: getParties,
  department: getDepartments,
  location: getLocation,
  uom: getUoms,
  discountedItems: getDiscountedItems,
  taxTemplate: getTaxTemplate,
  paymentTerm: getPaymentTerm,
  incoTerms: getIncoTerms,
  shippingRules: getShippingRules,
  bins: getBins,
  agreement: getAgreement,
  accounts: getChartOfAccounts,
  invoices: getPurchaseInvoices,
  purchaseOrderReceipts: getPurchaseOrderReceipts,
  representatives: getPurchaseRepresentatives,
  industry: getPartiesIndustry,
  categoryItems: getCategoryItems,
  customerSegment: getCustomerSegments,
  countries: getCountries
};
const MATERIAL_CONSTANTS = {
  STEEL_DENSITY: 7.85,
  LENGTH_CONVERSION_FACTOR: 1e3,
  TUBE_CALCULATION_FACTOR: 0.024662,
  COIL_WEIGHTS: {
    GI: 2879.95,
    HR: 2356.59
  }
};
const safeParseNumber = (value) => {
  if (value === void 0 || value === null || value === "") {
    return { value: 0, isValid: false, error: "Empty value" };
  }
  const parsed = typeof value === "string" ? parseFloat(value.trim()) : Number(value);
  if (isNaN(parsed)) {
    return { value: 0, isValid: false, error: "Invalid number format" };
  }
  if (!isFinite(parsed)) {
    return { value: 0, isValid: false, error: "Number is not finite" };
  }
  return { value: parsed, isValid: true };
};
const validatePositiveNumbers = (...values) => {
  return values.every((value) => {
    const result = safeParseNumber(value);
    return result.isValid && result.value > 0;
  });
};
const createMemoKey = (formValues) => {
  if (!formValues) return "empty";
  const relevantFields = [
    "face_width",
    "bending",
    "height",
    "total_width",
    "boards_thickness",
    "boards_length",
    "steel_length",
    "steel_width",
    "steel_thickness",
    "steel_type",
    "tube_type",
    "tube_od",
    "shape_width",
    "shape_height",
    "material_thickness",
    "material_length"
  ];
  return relevantFields.map((field) => `${field}:${formValues[field] ?? ""}`).join("|");
};
const calculateBoardsTotalWidth = (formValues) => {
  const { face_width, bending, height } = formValues;
  if (!validatePositiveNumbers(face_width, bending, height)) {
    return { value: 0, isValid: false, error: "Invalid input values for boards total width calculation" };
  }
  const faceWidthResult = safeParseNumber(face_width);
  const bendingResult = safeParseNumber(bending);
  const heightResult = safeParseNumber(height);
  if (![faceWidthResult, bendingResult, heightResult].every((r) => r.isValid)) {
    return { value: 0, isValid: false, error: "Failed to parse input values" };
  }
  const totalWidth = (heightResult.value + bendingResult.value) * 2 + faceWidthResult.value;
  return { value: totalWidth, isValid: true };
};
const calculateBoardsWeight = (formValues) => {
  const { total_width, boards_thickness, boards_length } = formValues;
  if (!validatePositiveNumbers(total_width, boards_thickness, boards_length)) {
    return { value: 0, isValid: false, error: "Invalid input values for boards weight calculation" };
  }
  const totalWidthResult = safeParseNumber(total_width);
  const thicknessResult = safeParseNumber(boards_thickness);
  const lengthResult = safeParseNumber(boards_length);
  if (![totalWidthResult, thicknessResult, lengthResult].every((r) => r.isValid)) {
    return { value: 0, isValid: false, error: "Failed to parse input values" };
  }
  const weight = totalWidthResult.value * thicknessResult.value * (lengthResult.value / MATERIAL_CONSTANTS.LENGTH_CONVERSION_FACTOR) * MATERIAL_CONSTANTS.STEEL_DENSITY;
  return { value: weight, isValid: true };
};
const calculateSteelWeight = (formValues) => {
  const { steel_length, steel_width, steel_thickness } = formValues;
  if (!validatePositiveNumbers(steel_length, steel_width, steel_thickness)) {
    return { value: 0, isValid: false, error: "Invalid input values for steel weight calculation" };
  }
  const lengthResult = safeParseNumber(steel_length);
  const widthResult = safeParseNumber(steel_width);
  const thicknessResult = safeParseNumber(steel_thickness);
  if (![lengthResult, widthResult, thicknessResult].every((r) => r.isValid)) {
    return { value: 0, isValid: false, error: "Failed to parse input values" };
  }
  const weight = lengthResult.value * widthResult.value * thicknessResult.value * MATERIAL_CONSTANTS.STEEL_DENSITY / MATERIAL_CONSTANTS.LENGTH_CONVERSION_FACTOR;
  return { value: weight, isValid: true };
};
const calculateMaterialUnit = (formValues) => {
  const { steel_type } = formValues;
  if (!steel_type) {
    return { value: 0, isValid: false, error: "Steel type not specified" };
  }
  if (!(steel_type in MATERIAL_CONSTANTS.COIL_WEIGHTS)) {
    return { value: 0, isValid: false, error: `Unsupported steel type: ${steel_type}` };
  }
  const weight = MATERIAL_CONSTANTS.COIL_WEIGHTS[steel_type];
  return { value: weight, isValid: true };
};
const calculateTubeMaterialWeight = (formValues) => {
  const { tube_type, tube_od, shape_width, shape_height, material_thickness, material_length } = formValues;
  if (!tube_type) {
    return { value: 0, isValid: false, error: "Tube type not specified" };
  }
  const thicknessResult = safeParseNumber(material_thickness);
  const lengthResult = safeParseNumber(material_length);
  if (!thicknessResult.isValid || !lengthResult.isValid) {
    return { value: 0, isValid: false, error: "Invalid thickness or length values" };
  }
  let weight = 0;
  switch (tube_type) {
    case "Round": {
      const odResult = safeParseNumber(tube_od);
      if (!odResult.isValid || odResult.value <= thicknessResult.value) {
        return { value: 0, isValid: false, error: "Invalid outer diameter for round tube" };
      }
      weight = (odResult.value - thicknessResult.value) * thicknessResult.value * MATERIAL_CONSTANTS.TUBE_CALCULATION_FACTOR * lengthResult.value;
      break;
    }
    case "Square":
    case "Rectangle": {
      const widthResult = safeParseNumber(shape_width);
      const heightResult = safeParseNumber(shape_height);
      if (!widthResult.isValid || !heightResult.isValid) {
        return { value: 0, isValid: false, error: "Invalid width or height for rectangular tube" };
      }
      const perimeter = 2 * (widthResult.value + heightResult.value);
      weight = (perimeter / Math.PI - thicknessResult.value) * thicknessResult.value * MATERIAL_CONSTANTS.TUBE_CALCULATION_FACTOR * lengthResult.value;
      break;
    }
    default:
      return { value: 0, isValid: false, error: `Unsupported tube type: ${tube_type}` };
  }
  return { value: Math.max(0, weight), isValid: true };
};
const useMaterialCalculations = (formValues) => {
  const calculations = useMemo(() => {
    if (!formValues) {
      return {
        totalWidth: 0,
        materialUnit: 0,
        boardsWeight: 0,
        steelWeight: 0,
        materialWeight: 0
      };
    }
    const totalWidthResult = calculateBoardsTotalWidth(formValues);
    const materialUnitResult = calculateMaterialUnit(formValues);
    const boardsWeightResult = calculateBoardsWeight(formValues);
    const steelWeightResult = calculateSteelWeight(formValues);
    const materialWeightResult = calculateTubeMaterialWeight(formValues);
    if (process.env.NODE_ENV === "development") {
      [totalWidthResult, materialUnitResult, boardsWeightResult, steelWeightResult, materialWeightResult].filter((result) => !result.isValid && result.error).forEach((result) => console.warn("Calculation warning:", result.error));
    }
    return {
      totalWidth: totalWidthResult.value,
      materialUnit: materialUnitResult.value,
      boardsWeight: boardsWeightResult.value,
      steelWeight: steelWeightResult.value,
      materialWeight: materialWeightResult.value
    };
  }, [createMemoKey(formValues)]);
  return calculations;
};
const validateFormValues = (formValues) => {
  const errors = [];
  const { tube_type, steel_type } = formValues;
  if (steel_type && !(steel_type in MATERIAL_CONSTANTS.COIL_WEIGHTS)) {
    errors.push(`Invalid steel type: ${steel_type}`);
  }
  if (tube_type && !["Round", "Square", "Rectangle"].includes(tube_type)) {
    errors.push(`Invalid tube type: ${tube_type}`);
  }
  return { isValid: errors.length === 0, errors };
};
const getAvailableSteelTypes = () => {
  return Object.keys(MATERIAL_CONSTANTS.COIL_WEIGHTS);
};
const getAvailableTubeTypes = () => {
  return ["Round", "Square", "Rectangle"];
};
const useNameSkuUniquenessCheck = ({
  fieldPrefix,
  formMethods,
  data
}) => {
  const { watch = () => {
  }, setError = () => {
  } } = formMethods || {};
  const formValues = watch(fieldPrefix);
  const namePrev = data == null ? void 0 : data.name;
  const skuPrev = data == null ? void 0 : data.sku;
  const checkNameAndSkuUniqueness = useCallback(async () => {
    let isUnique = true;
    try {
      if (namePrev === (formValues == null ? void 0 : formValues.name) && skuPrev === (formValues == null ? void 0 : formValues.sku)) return true;
      const response = await checkSkuAndItemName({
        name: formValues == null ? void 0 : formValues.name,
        sku: formValues == null ? void 0 : formValues.sku,
        ...(data == null ? void 0 : data.id) && { id: data == null ? void 0 : data.id }
      });
      if (response.name) {
        setError(`${fieldPrefix}.name`, {
          message: "Name already exists",
          type: "manual",
          ref: `${fieldPrefix}.name`
        });
        isUnique = false;
      }
      if (response.sku) {
        setError(`${fieldPrefix}.sku`, {
          message: "SKU already exists",
          type: "manual",
          ref: `${fieldPrefix}.sku`
        });
        isUnique = false;
      }
      return isUnique;
    } catch (error) {
      console.error("Uniqueness check failed:", error);
      return isUnique;
    }
  }, [formValues == null ? void 0 : formValues.name, formValues == null ? void 0 : formValues.sku, setError]);
  return { checkNameAndSkuUniqueness };
};
function useUniquenessCheck({ fieldPrefix, formMethods, data = {}, fields = [] }) {
  const { watch = () => {
  }, setError = () => {
  }, formState = {} } = formMethods || {};
  const formValues = watch(fieldPrefix);
  const previous = useMemo(() => data || {}, [data]);
  const checkUniqueness = async () => {
    let isUnique = true;
    try {
      const nothingChanged = fields.every((field) => previous[field] === (formValues == null ? void 0 : formValues[field]));
      if (nothingChanged) return true;
      const payload = {};
      fields.forEach((field) => payload[field] = formValues == null ? void 0 : formValues[field]);
      if (data == null ? void 0 : data.id) payload.id = data.id;
      const response = await checkUniqueFields(payload);
      for (const [field, exists] of Object.entries(response)) {
        if (exists) {
          const errorPath = `${fieldPrefix}.${field}`;
          setError(errorPath, {
            type: "manual",
            message: `${field.replace(/_/g, " ").toLowerCase()} already exists`
          });
          isUnique = false;
        }
      }
      console.log("Errors now:", formState.errors);
      return isUnique;
    } catch (error) {
      console.error("Uniqueness check failed:", error);
      return isUnique;
    }
  };
  return { checkUniqueness };
}
const DEFAULT_FALLBACK_CONFIG = {
  fallbackOrder: ["en", "en-US", DEFAULT_LANG],
  // English first
  enableConsoleWarnings: true,
  retryOnError: false,
  maxRetries: 3
};
const useLanguageFallback = (config = {}) => {
  const finalConfig = { ...DEFAULT_FALLBACK_CONFIG, ...config };
  const [retryCount, setRetryCount] = useState(0);
  const createEnglishFallback = () => ({
    code: "en",
    label: "English",
    direction: "ltr"
  });
  const findBestAvailableLanguage = (languages, preferredCode) => {
    if (!languages || languages.length === 0) {
      if (finalConfig.enableConsoleWarnings) {
        console.warn("No languages available for fallback selection, using English");
      }
      return createEnglishFallback();
    }
    if (preferredCode) {
      const preferred = languages.find((lang) => lang.code === preferredCode);
      if (preferred) return preferred;
      if (finalConfig.enableConsoleWarnings) {
        console.warn(`Preferred language "${preferredCode}" not found, trying fallbacks`);
      }
    }
    for (const fallbackCode of finalConfig.fallbackOrder) {
      const fallback = languages.find((lang) => lang.code === fallbackCode);
      if (fallback) {
        if (finalConfig.enableConsoleWarnings && preferredCode && preferredCode !== fallbackCode) {
          console.warn(`Using fallback language: "${fallbackCode}" instead of "${preferredCode}"`);
        }
        return fallback;
      }
    }
    const englishLang = languages.find((lang) => lang.code === "en");
    if (englishLang) {
      if (finalConfig.enableConsoleWarnings) {
        console.warn("Using English as ultimate fallback");
      }
      return englishLang;
    }
    if (finalConfig.enableConsoleWarnings) {
      console.warn("No English fallback found, using first available language");
    }
    return languages[0] || createEnglishFallback();
  };
  const createEmergencyFallback = () => {
    return createEnglishFallback();
  };
  const validateLanguageCode = (languages, code) => {
    return languages.some((lang) => lang.code === code);
  };
  const getSavedLanguage = (languages) => {
    const saved = localStorage.getItem("_language");
    if (!saved) return null;
    if (validateLanguageCode(languages, saved)) {
      return saved;
    }
    if (finalConfig.enableConsoleWarnings) {
      console.warn(`Saved language "${saved}" is no longer available, will use English fallback`);
    }
    return null;
  };
  const ensureEnglishAvailable = (languages) => {
    const hasEnglish = languages.some((lang) => lang.code === "en");
    if (!hasEnglish) {
      return [createEnglishFallback(), ...languages];
    }
    return languages;
  };
  const shouldRetry = () => {
    return finalConfig.retryOnError && retryCount < finalConfig.maxRetries;
  };
  const incrementRetry = () => {
    setRetryCount((prev) => prev + 1);
  };
  const resetRetry = () => {
    setRetryCount(0);
  };
  return {
    findBestAvailableLanguage,
    createEmergencyFallback,
    createEnglishFallback,
    validateLanguageCode,
    getSavedLanguage,
    ensureEnglishAvailable,
    shouldRetry,
    incrementRetry,
    resetRetry,
    retryCount,
    config: finalConfig
  };
};
const useLanguageState = () => {
  const [isInitialized, setIsInitialized] = useState(false);
  const [hasError, setHasError] = useState(false);
  const [errorMessage, setErrorMessage] = useState(null);
  const markInitialized = () => setIsInitialized(true);
  const setError = (error) => {
    setHasError(true);
    setErrorMessage(error);
  };
  const clearError = () => {
    setHasError(false);
    setErrorMessage(null);
  };
  return {
    isInitialized,
    hasError,
    errorMessage,
    markInitialized,
    setError,
    clearError
  };
};
const useReduxIntegration = () => {
  const { useRedux, apiClient } = useERPUI();
  const useConditionalRedux = (reduxHook, fallbackValue) => {
    if (!useRedux) {
      return fallbackValue;
    }
    try {
      return reduxHook();
    } catch (error) {
      console.warn("Redux hook failed, falling back to default value:", error);
      return fallbackValue;
    }
  };
  const conditionalDispatch = (action) => {
    if (!useRedux) {
      console.warn("Redux not enabled, cannot dispatch action:", action);
      return Promise.resolve();
    }
    try {
      const { useAppDispatch } = require("../redux/hooks");
      const dispatch = useAppDispatch();
      return dispatch(action);
    } catch (error) {
      console.error("Failed to dispatch Redux action:", error);
      return Promise.reject(error);
    }
  };
  return {
    useRedux,
    apiClient,
    useConditionalRedux,
    conditionalDispatch
  };
};
function computeTotal(items, discountOn, netAmountField = "net_amount", grossAmountField = "gross_amount") {
  const field = discountOn === "Gross Amount" ? grossAmountField : netAmountField;
  return items.reduce((sum, item) => sum + Number(item[field] || 0), 0);
}
function useAdditionalDiscountAutoCalc(config) {
  const lastChangedBy = useRef("user");
  const lastUserEdited = useRef(null);
  useEffect(() => {
    if (lastChangedBy.current === "auto") {
      lastChangedBy.current = "user";
      return;
    }
    if (!config.discountOn) return;
    const pct = Number(config.percentage);
    const amt = Number(config.amount);
    const total = computeTotal(config.items, config.discountOn, config.netAmountField, config.grossAmountField);
    if (!pct && amt && lastUserEdited.current === "percentage") {
      config.setValue(config.fieldConfig.amountField, 0);
      lastUserEdited.current = null;
      return;
    }
    if (!pct || !total) return;
    lastUserEdited.current = "percentage";
    lastChangedBy.current = "auto";
    config.setValue(
      config.fieldConfig.amountField,
      calculateAdditionalDiscountCrossValue(pct, "percentage", total)
    );
  }, [config.percentage, config.discountOn]);
  useEffect(() => {
    if (lastChangedBy.current === "auto") {
      lastChangedBy.current = "user";
      return;
    }
    if (!config.discountOn) return;
    const pct = Number(config.percentage);
    const amt = Number(config.amount);
    const total = computeTotal(config.items, config.discountOn, config.netAmountField, config.grossAmountField);
    if (!amt && pct && lastUserEdited.current === "amount") {
      config.setValue(config.fieldConfig.percentageField, 0);
      lastUserEdited.current = null;
      return;
    }
    if (!amt || !total) return;
    lastUserEdited.current = "amount";
    lastChangedBy.current = "auto";
    config.setValue(
      config.fieldConfig.percentageField,
      calculateAdditionalDiscountCrossValue(amt, "amount", total)
    );
  }, [config.amount, config.discountOn]);
  const autoPercentageDisabled = !config.discountOn || Boolean(Number(config.amount)) && lastUserEdited.current !== "percentage";
  const autoAmountDisabled = !config.discountOn || Boolean(Number(config.percentage)) && lastUserEdited.current !== "amount";
  const isPercentageDisabled = config.manualDisabled ? config.disablePercentageField ?? false : autoPercentageDisabled;
  const isAmountDisabled = config.manualDisabled ? config.disableAmountField ?? false : autoAmountDisabled;
  const totalAmount = config.discountOn ? computeTotal(config.items, config.discountOn, config.netAmountField, config.grossAmountField) : 0;
  const isAmountExceeded = !!(config.discountOn && totalAmount > 0 && Number(config.amount) > totalAmount);
  const isPercentageExceeded = Number(config.percentage) > 100;
  return { isPercentageDisabled, isAmountDisabled, isAmountExceeded, isPercentageExceeded };
}
export {
  apiType as a,
  convertEmptyToNull as b,
  capitalizeWords as c,
  defaultUserCurrency as d,
  formatTime as e,
  formatNumber as f,
  formateDate as g,
  getAvailableSteelTypes as h,
  getAvailableTubeTypes as i,
  removeExtraKeys as j,
  useLanguageFallback as k,
  useLanguageState as l,
  useMaterialCalculations as m,
  useNameSkuUniquenessCheck as n,
  useReduxIntegration as o,
  useUniquenessCheck as p,
  valueWithCurrency as q,
  recursiveSort as r,
  sortData as s,
  useAdditionalDiscountAutoCalc as u,
  validateFormValues as v
};
//# sourceMappingURL=useAdditionalDiscountAutoCalc-CNX5oPoT.esm.js.map
