import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard";
import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString";
import typia from 'typia';
export const assertWidgetLayout = (() => { const _io0 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title); const _io1 = input => "string" === typeof input.property && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width) && (null !== input.widget && (undefined === input.widget || "string" === typeof input.widget || "object" === typeof input.widget && null !== input.widget && false === Array.isArray(input.widget) && _io2(input.widget))); const _io2 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.readOnly || "boolean" === typeof input.readOnly) && Object.keys(input).every(key => {
    if (["type", "readOnly"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return true;
}); const _iu0 = input => (() => {
    if (undefined !== input.type)
        return _io0(input);
    else if (undefined !== input.property)
        return _io1(input);
    else
        return false;
})(); const _ia0 = input => input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || (Array.isArray(elem) && (_ia0(elem) || false) || "object" === typeof elem && null !== elem && _iu0(elem)))); const _ao0 = (input, _path, _exceptionable = true) => ("divider" === input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".type",
    expected: "\"divider\"",
    value: input.type
}, _errorFactory)) && (undefined === input.title || "string" === typeof input.title || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".title",
    expected: "(string | undefined)",
    value: input.title
}, _errorFactory)); const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.property || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".property",
    expected: "string",
    value: input.property
}, _errorFactory)) && (undefined === input.width || "string" === typeof input.width || "number" === typeof input.width || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".width",
    expected: "(number | string | undefined)",
    value: input.width
}, _errorFactory)) && ((null !== input.widget || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".widget",
    expected: "(WidgetOptions | string | undefined)",
    value: input.widget
}, _errorFactory)) && (undefined === input.widget || "string" === typeof input.widget || ("object" === typeof input.widget && null !== input.widget && false === Array.isArray(input.widget) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".widget",
    expected: "(WidgetOptions | string | undefined)",
    value: input.widget
}, _errorFactory)) && _ao2(input.widget, _path + ".widget", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".widget",
    expected: "(WidgetOptions | string | undefined)",
    value: input.widget
}, _errorFactory))); const _ao2 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".type",
    expected: "(string | undefined)",
    value: input.type
}, _errorFactory)) && (undefined === input.readOnly || "boolean" === typeof input.readOnly || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + ".readOnly",
    expected: "(boolean | undefined)",
    value: input.readOnly
}, _errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
    if (["type", "readOnly"].some(prop => key === prop))
        return true;
    const value = input[key];
    if (undefined === value)
        return true;
    return true;
})); const _au0 = (input, _path, _exceptionable = true) => (() => {
    if (undefined !== input.type)
        return _ao0(input, _path, true && _exceptionable);
    else if (undefined !== input.property)
        return _ao1(input, _path, true && _exceptionable);
    else
        return __typia_transform__assertGuard._assertGuard(_exceptionable, {
            method: "typia.createAssert",
            path: _path,
            expected: "(WidgetLayoutDivider | WidgetLayoutItem)",
            value: input
        }, _errorFactory);
})(); const _aa0 = (input, _path, _exceptionable = true) => input.every((elem, _index4) => (undefined !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + "[" + _index4 + "]",
    expected: "(Array<WidgetLayoutElement> | WidgetLayoutDivider | WidgetLayoutItem | null | string)",
    value: elem
}, _errorFactory)) && (null === elem || "string" === typeof elem || (Array.isArray(elem) && (_aa0(elem, _path + "[" + _index4 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + "[" + _index4 + "]",
    expected: "Array<WidgetLayoutElement>",
    value: elem
}, _errorFactory)) || "object" === typeof elem && null !== elem && _au0(elem, _path + "[" + _index4 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + "[" + _index4 + "]",
    expected: "(Array<WidgetLayoutElement> | WidgetLayoutDivider | WidgetLayoutItem | null | string)",
    value: elem
}, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
    method: "typia.createAssert",
    path: _path + "[" + _index4 + "]",
    expected: "(Array<WidgetLayoutElement> | WidgetLayoutDivider | WidgetLayoutItem | null | string)",
    value: elem
}, _errorFactory))); const __is = input => Array.isArray(input) && input.every(elem => undefined !== elem && (null === elem || "string" === typeof elem || (Array.isArray(elem) && (_ia0(elem) || false) || "object" === typeof elem && null !== elem && _iu0(elem)))); let _errorFactory; return (input, errorFactory) => {
    if (false === __is(input)) {
        _errorFactory = errorFactory;
        ((input, _path, _exceptionable = true) => (Array.isArray(input) || __typia_transform__assertGuard._assertGuard(true, {
            method: "typia.createAssert",
            path: _path + "",
            expected: "WidgetLayout",
            value: input
        }, _errorFactory)) && input.every((elem, _index3) => (undefined !== elem || __typia_transform__assertGuard._assertGuard(true, {
            method: "typia.createAssert",
            path: _path + "[" + _index3 + "]",
            expected: "(Array<WidgetLayoutElement> | WidgetLayoutDivider | WidgetLayoutItem | null | string)",
            value: elem
        }, _errorFactory)) && (null === elem || "string" === typeof elem || (Array.isArray(elem) && (_aa0(elem, _path + "[" + _index3 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
            method: "typia.createAssert",
            path: _path + "[" + _index3 + "]",
            expected: "Array<WidgetLayoutElement>",
            value: elem
        }, _errorFactory)) || "object" === typeof elem && null !== elem && _au0(elem, _path + "[" + _index3 + "]", true) || __typia_transform__assertGuard._assertGuard(true, {
            method: "typia.createAssert",
            path: _path + "[" + _index3 + "]",
            expected: "(Array<WidgetLayoutElement> | WidgetLayoutDivider | WidgetLayoutItem | null | string)",
            value: elem
        }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(true, {
            method: "typia.createAssert",
            path: _path + "[" + _index3 + "]",
            expected: "(Array<WidgetLayoutElement> | WidgetLayoutDivider | WidgetLayoutItem | null | string)",
            value: elem
        }, _errorFactory))) || __typia_transform__assertGuard._assertGuard(true, {
            method: "typia.createAssert",
            path: _path + "",
            expected: "WidgetLayout",
            value: input
        }, _errorFactory))(input, "$input", true);
    }
    return input;
}; })();
export const isWidgetLayoutDivider = (() => { const _io0 = input => "divider" === input.type && (undefined === input.title || "string" === typeof input.title); return input => "object" === typeof input && null !== input && _io0(input); })();
