//#region src/errors.ts
var CartValidationError = class extends Error {
	field;
	detail;
	name = "CartValidationError";
	code = "CART_VALIDATION";
	constructor(field, detail) {
		super(detail ? `cart validation failed: ${field} — ${detail}` : `cart validation failed: ${field}`);
		this.field = field;
		this.detail = detail;
	}
};
var MixedCurrencyError = class extends Error {
	expected;
	got;
	name = "MixedCurrencyError";
	code = "MIXED_CURRENCY";
	constructor(expected, got) {
		super(`mixed currency: expected ${expected}, got ${got}`);
		this.expected = expected;
		this.got = got;
	}
};
function isCartValidationError(e) {
	return typeof e === "object" && e !== null && e.name === "CartValidationError" && e.code === "CART_VALIDATION";
}
function isMixedCurrencyError(e) {
	return typeof e === "object" && e !== null && e.name === "MixedCurrencyError" && e.code === "MIXED_CURRENCY";
}
//#endregion
export { isMixedCurrencyError as i, MixedCurrencyError as n, isCartValidationError as r, CartValidationError as t };
