import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js";
import * as __typia_transform__jsonStringifyString from "typia/lib/internal/_jsonStringifyString.js";
import * as __typia_transform__throwTypeGuardError from "typia/lib/internal/_throwTypeGuardError.js";
import { createAssert, json } from "typia";
export const parseTokenMetadataJSON = (() => { const _io0 = input => ("string" === typeof input.decimalPlaces || "number" === typeof input.decimalPlaces) && (undefined === input.logoURI || "string" === typeof input.logoURI); const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.decimalPlaces || "number" === typeof input.decimalPlaces || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "json.createAssertParse",
    path: _path + ".decimalPlaces",
    expected: "(number | string)",
    value: input.decimalPlaces
}, _errorFactory)) && (undefined === input.logoURI || "string" === typeof input.logoURI || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "json.createAssertParse",
    path: _path + ".logoURI",
    expected: "(string | undefined)",
    value: input.logoURI
}, _errorFactory)); const __is = input => "object" === typeof input && null !== input && _io0(input); let _errorFactory; const __assert = (input, errorFactory) => {
    if (false === __is(input)) {
        _errorFactory = errorFactory;
        ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
            method: "json.createAssertParse",
            path: _path + "",
            expected: "TokenMetadataJSON",
            value: input
        }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
            method: "json.createAssertParse",
            path: _path + "",
            expected: "TokenMetadataJSON",
            value: input
        }, _errorFactory))(input, "$input", true);
    }
    return input;
}; return (input, errorFactory) => __assert(JSON.parse(input), errorFactory); })();
export const stringifyTokenMetadataJSON = (() => { const _so0 = input => `{${undefined === input.logoURI ? "" : `"logoURI":${undefined !== input.logoURI ? __typia_transform__jsonStringifyString._jsonStringifyString(input.logoURI) : undefined},`}"decimalPlaces":${(() => {
    if ("string" === typeof input.decimalPlaces)
        return __typia_transform__jsonStringifyString._jsonStringifyString(input.decimalPlaces);
    if ("number" === typeof input.decimalPlaces)
        return input.decimalPlaces;
    __typia_transform__throwTypeGuardError._throwTypeGuardError({
        method: "json.createStringify",
        expected: "(number | string)",
        value: input.decimalPlaces
    });
})()}}`; return input => _so0(input); })();
export const assertTokenMetadataJSON = (() => { const _io0 = input => ("string" === typeof input.decimalPlaces || "number" === typeof input.decimalPlaces) && (undefined === input.logoURI || "string" === typeof input.logoURI); const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.decimalPlaces || "number" === typeof input.decimalPlaces || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssert",
    path: _path + ".decimalPlaces",
    expected: "(number | string)",
    value: input.decimalPlaces
}, _errorFactory)) && (undefined === input.logoURI || "string" === typeof input.logoURI || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "createAssert",
    path: _path + ".logoURI",
    expected: "(string | undefined)",
    value: input.logoURI
}, _errorFactory)); const __is = input => "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => {
    if (false === __is(input)) {
        _errorFactory = errorFactory;
        ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
            method: "createAssert",
            path: _path + "",
            expected: "TokenMetadataJSON",
            value: input
        }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
            method: "createAssert",
            path: _path + "",
            expected: "TokenMetadataJSON",
            value: input
        }, _errorFactory))(input, "$input", true);
    }
    return input;
}; })();
//# sourceMappingURL=token-metadata.generated.js.map