// chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search.mojom-webui.ts is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import { mojo } from '//resources/mojo/mojo/public/js/bindings.js';
import { MojoBrowserProxyFactory } from '//resources/mojo/mojo_browser_proxy.js';
import { TokenSpec as mojoBase_mojom_TokenSpec } from '//resources/mojo/mojo/public/mojom/base/token.mojom-webui.js';
import { SkColorSpec as skia_mojom_SkColorSpec } from '//resources/mojo/skia/public/mojom/skcolor.mojom-webui.js';
import { UrlSpec as url_mojom_UrlSpec } from '//resources/mojo/url/mojom/url.mojom-webui.js';
export const DescriptorDNameSpec = { $: mojo.internal.Enum() };
export var DescriptorDName;
(function (DescriptorDName) {
    DescriptorDName[DescriptorDName["MIN_VALUE"] = 0] = "MIN_VALUE";
    DescriptorDName[DescriptorDName["MAX_VALUE"] = 0] = "MAX_VALUE";
    DescriptorDName[DescriptorDName["kYellow"] = 0] = "kYellow";
})(DescriptorDName || (DescriptorDName = {}));
export const WallpaperSearchStatusSpec = { $: mojo.internal.Enum() };
export var WallpaperSearchStatus;
(function (WallpaperSearchStatus) {
    WallpaperSearchStatus[WallpaperSearchStatus["MIN_VALUE"] = 0] = "MIN_VALUE";
    WallpaperSearchStatus[WallpaperSearchStatus["MAX_VALUE"] = 4] = "MAX_VALUE";
    WallpaperSearchStatus[WallpaperSearchStatus["kOk"] = 0] = "kOk";
    WallpaperSearchStatus[WallpaperSearchStatus["kError"] = 1] = "kError";
    WallpaperSearchStatus[WallpaperSearchStatus["kRequestThrottled"] = 2] = "kRequestThrottled";
    WallpaperSearchStatus[WallpaperSearchStatus["kOffline"] = 3] = "kOffline";
    WallpaperSearchStatus[WallpaperSearchStatus["kSignedOut"] = 4] = "kSignedOut";
})(WallpaperSearchStatus || (WallpaperSearchStatus = {}));
export const UserFeedbackSpec = { $: mojo.internal.Enum() };
export var UserFeedback;
(function (UserFeedback) {
    UserFeedback[UserFeedback["MIN_VALUE"] = 0] = "MIN_VALUE";
    UserFeedback[UserFeedback["MAX_VALUE"] = 2] = "MAX_VALUE";
    UserFeedback[UserFeedback["kUnspecified"] = 0] = "kUnspecified";
    UserFeedback[UserFeedback["kThumbsUp"] = 1] = "kThumbsUp";
    UserFeedback[UserFeedback["kThumbsDown"] = 2] = "kThumbsDown";
})(UserFeedback || (UserFeedback = {}));
export class WallpaperSearchHandlerFactoryPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'side_panel.customize_chrome.mojom.WallpaperSearchHandlerFactory', scope);
    }
}
export class WallpaperSearchHandlerFactoryRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(WallpaperSearchHandlerFactoryPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    createWallpaperSearchHandler(client, handler) {
        this.proxy.sendMessage(1614008574, WallpaperSearchHandlerFactory_CreateWallpaperSearchHandler_ParamsSpec.$, null, [
            client,
            handler
        ], false);
    }
}
;
/**
 * An object which receives request messages for the WallpaperSearchHandlerFactory
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class WallpaperSearchHandlerFactoryReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(WallpaperSearchHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1614008574, WallpaperSearchHandlerFactory_CreateWallpaperSearchHandler_ParamsSpec.$, null, impl.createWallpaperSearchHandler.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class WallpaperSearchHandlerFactory {
    static get $interfaceName() {
        return "side_panel.customize_chrome.mojom.WallpaperSearchHandlerFactory";
    }
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote() {
        let remote = new WallpaperSearchHandlerFactoryRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the WallpaperSearchHandlerFactory
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export class WallpaperSearchHandlerFactoryCallbackRouter {
    helper_internal_;
    $;
    router_;
    createWallpaperSearchHandler;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(WallpaperSearchHandlerFactoryRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.createWallpaperSearchHandler =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1614008574, WallpaperSearchHandlerFactory_CreateWallpaperSearchHandler_ParamsSpec.$, null, this.createWallpaperSearchHandler.createReceiverHandler(false /* expectsResponse */), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id) {
        return this.router_.removeListener(id);
    }
}
export class WallpaperSearchHandlerPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'side_panel.customize_chrome.mojom.WallpaperSearchHandler', scope);
    }
}
export class WallpaperSearchHandlerRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(WallpaperSearchHandlerPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    getDescriptors() {
        return this.proxy.sendMessage(1754020249, WallpaperSearchHandler_GetDescriptors_ParamsSpec.$, WallpaperSearchHandler_GetDescriptors_ResponseParamsSpec.$, [], false);
    }
    getInspirations() {
        return this.proxy.sendMessage(1783940542, WallpaperSearchHandler_GetInspirations_ParamsSpec.$, WallpaperSearchHandler_GetInspirations_ResponseParamsSpec.$, [], false);
    }
    getWallpaperSearchResults(resultDescriptors) {
        return this.proxy.sendMessage(1094941268, WallpaperSearchHandler_GetWallpaperSearchResults_ParamsSpec.$, WallpaperSearchHandler_GetWallpaperSearchResults_ResponseParamsSpec.$, [
            resultDescriptors
        ], false);
    }
    setResultRenderTime(resultIds, time) {
        this.proxy.sendMessage(1039933324, WallpaperSearchHandler_SetResultRenderTime_ParamsSpec.$, null, [
            resultIds,
            time
        ], false);
    }
    setBackgroundToHistoryImage(resultId, descriptors) {
        this.proxy.sendMessage(1834605646, WallpaperSearchHandler_SetBackgroundToHistoryImage_ParamsSpec.$, null, [
            resultId,
            descriptors
        ], false);
    }
    setBackgroundToInspirationImage(id, backgroundUrl) {
        this.proxy.sendMessage(1875743497, WallpaperSearchHandler_SetBackgroundToInspirationImage_ParamsSpec.$, null, [
            id,
            backgroundUrl
        ], false);
    }
    setBackgroundToWallpaperSearchResult(resultId, time, descriptors) {
        this.proxy.sendMessage(1717383006, WallpaperSearchHandler_SetBackgroundToWallpaperSearchResult_ParamsSpec.$, null, [
            resultId,
            time,
            descriptors
        ], false);
    }
    updateHistory() {
        this.proxy.sendMessage(609601966, WallpaperSearchHandler_UpdateHistory_ParamsSpec.$, null, [], false);
    }
    setUserFeedback(selectedOption) {
        this.proxy.sendMessage(1028342463, WallpaperSearchHandler_SetUserFeedback_ParamsSpec.$, null, [
            selectedOption
        ], false);
    }
    openHelpArticle() {
        this.proxy.sendMessage(1454767827, WallpaperSearchHandler_OpenHelpArticle_ParamsSpec.$, null, [], false);
    }
    launchHatsSurvey() {
        this.proxy.sendMessage(872337106, WallpaperSearchHandler_LaunchHatsSurvey_ParamsSpec.$, null, [], false);
    }
}
;
/**
 * An object which receives request messages for the WallpaperSearchHandler
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class WallpaperSearchHandlerReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(WallpaperSearchHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1754020249, WallpaperSearchHandler_GetDescriptors_ParamsSpec.$, WallpaperSearchHandler_GetDescriptors_ResponseParamsSpec.$, impl.getDescriptors.bind(impl), false);
        this.helper_internal_.registerHandler(1783940542, WallpaperSearchHandler_GetInspirations_ParamsSpec.$, WallpaperSearchHandler_GetInspirations_ResponseParamsSpec.$, impl.getInspirations.bind(impl), false);
        this.helper_internal_.registerHandler(1094941268, WallpaperSearchHandler_GetWallpaperSearchResults_ParamsSpec.$, WallpaperSearchHandler_GetWallpaperSearchResults_ResponseParamsSpec.$, impl.getWallpaperSearchResults.bind(impl), false);
        this.helper_internal_.registerHandler(1039933324, WallpaperSearchHandler_SetResultRenderTime_ParamsSpec.$, null, impl.setResultRenderTime.bind(impl), false);
        this.helper_internal_.registerHandler(1834605646, WallpaperSearchHandler_SetBackgroundToHistoryImage_ParamsSpec.$, null, impl.setBackgroundToHistoryImage.bind(impl), false);
        this.helper_internal_.registerHandler(1875743497, WallpaperSearchHandler_SetBackgroundToInspirationImage_ParamsSpec.$, null, impl.setBackgroundToInspirationImage.bind(impl), false);
        this.helper_internal_.registerHandler(1717383006, WallpaperSearchHandler_SetBackgroundToWallpaperSearchResult_ParamsSpec.$, null, impl.setBackgroundToWallpaperSearchResult.bind(impl), false);
        this.helper_internal_.registerHandler(609601966, WallpaperSearchHandler_UpdateHistory_ParamsSpec.$, null, impl.updateHistory.bind(impl), false);
        this.helper_internal_.registerHandler(1028342463, WallpaperSearchHandler_SetUserFeedback_ParamsSpec.$, null, impl.setUserFeedback.bind(impl), false);
        this.helper_internal_.registerHandler(1454767827, WallpaperSearchHandler_OpenHelpArticle_ParamsSpec.$, null, impl.openHelpArticle.bind(impl), false);
        this.helper_internal_.registerHandler(872337106, WallpaperSearchHandler_LaunchHatsSurvey_ParamsSpec.$, null, impl.launchHatsSurvey.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class WallpaperSearchHandler {
    static get $interfaceName() {
        return "side_panel.customize_chrome.mojom.WallpaperSearchHandler";
    }
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote() {
        let remote = new WallpaperSearchHandlerRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the WallpaperSearchHandler
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export class WallpaperSearchHandlerCallbackRouter {
    helper_internal_;
    $;
    router_;
    getDescriptors;
    getInspirations;
    getWallpaperSearchResults;
    setResultRenderTime;
    setBackgroundToHistoryImage;
    setBackgroundToInspirationImage;
    setBackgroundToWallpaperSearchResult;
    updateHistory;
    setUserFeedback;
    openHelpArticle;
    launchHatsSurvey;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(WallpaperSearchHandlerRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.getDescriptors =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1754020249, WallpaperSearchHandler_GetDescriptors_ParamsSpec.$, WallpaperSearchHandler_GetDescriptors_ResponseParamsSpec.$, this.getDescriptors.createReceiverHandler(true /* expectsResponse */), false);
        this.getInspirations =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1783940542, WallpaperSearchHandler_GetInspirations_ParamsSpec.$, WallpaperSearchHandler_GetInspirations_ResponseParamsSpec.$, this.getInspirations.createReceiverHandler(true /* expectsResponse */), false);
        this.getWallpaperSearchResults =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1094941268, WallpaperSearchHandler_GetWallpaperSearchResults_ParamsSpec.$, WallpaperSearchHandler_GetWallpaperSearchResults_ResponseParamsSpec.$, this.getWallpaperSearchResults.createReceiverHandler(true /* expectsResponse */), false);
        this.setResultRenderTime =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1039933324, WallpaperSearchHandler_SetResultRenderTime_ParamsSpec.$, null, this.setResultRenderTime.createReceiverHandler(false /* expectsResponse */), false);
        this.setBackgroundToHistoryImage =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1834605646, WallpaperSearchHandler_SetBackgroundToHistoryImage_ParamsSpec.$, null, this.setBackgroundToHistoryImage.createReceiverHandler(false /* expectsResponse */), false);
        this.setBackgroundToInspirationImage =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1875743497, WallpaperSearchHandler_SetBackgroundToInspirationImage_ParamsSpec.$, null, this.setBackgroundToInspirationImage.createReceiverHandler(false /* expectsResponse */), false);
        this.setBackgroundToWallpaperSearchResult =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1717383006, WallpaperSearchHandler_SetBackgroundToWallpaperSearchResult_ParamsSpec.$, null, this.setBackgroundToWallpaperSearchResult.createReceiverHandler(false /* expectsResponse */), false);
        this.updateHistory =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(609601966, WallpaperSearchHandler_UpdateHistory_ParamsSpec.$, null, this.updateHistory.createReceiverHandler(false /* expectsResponse */), false);
        this.setUserFeedback =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1028342463, WallpaperSearchHandler_SetUserFeedback_ParamsSpec.$, null, this.setUserFeedback.createReceiverHandler(false /* expectsResponse */), false);
        this.openHelpArticle =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1454767827, WallpaperSearchHandler_OpenHelpArticle_ParamsSpec.$, null, this.openHelpArticle.createReceiverHandler(false /* expectsResponse */), false);
        this.launchHatsSurvey =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(872337106, WallpaperSearchHandler_LaunchHatsSurvey_ParamsSpec.$, null, this.launchHatsSurvey.createReceiverHandler(false /* expectsResponse */), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id) {
        return this.router_.removeListener(id);
    }
}
export class WallpaperSearchClientPendingReceiver {
    handle;
    constructor(handle) {
        this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle);
    }
    bindInBrowser(scope = 'context') {
        mojo.internal.interfaceSupport.bind(this.handle, 'side_panel.customize_chrome.mojom.WallpaperSearchClient', scope);
    }
}
export class WallpaperSearchClientRemote {
    proxy;
    $;
    onConnectionError;
    constructor(handle) {
        this.proxy =
            new mojo.internal.interfaceSupport.InterfaceRemoteBase(WallpaperSearchClientPendingReceiver, handle);
        this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
        this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
    }
    setHistory(history) {
        this.proxy.sendMessage(1518864526, WallpaperSearchClient_SetHistory_ParamsSpec.$, null, [
            history
        ], false);
    }
}
;
/**
 * An object which receives request messages for the WallpaperSearchClient
 * mojom interface. Must be constructed over an object which implements that
 * interface.
 */
export class WallpaperSearchClientReceiver {
    helper_internal_;
    $;
    onConnectionError;
    constructor(impl) {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(WallpaperSearchClientRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.helper_internal_.registerHandler(1518864526, WallpaperSearchClient_SetHistory_ParamsSpec.$, null, impl.setHistory.bind(impl), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
}
export class WallpaperSearchClient {
    static get $interfaceName() {
        return "side_panel.customize_chrome.mojom.WallpaperSearchClient";
    }
    /**
     * Returns a remote for this interface which sends messages to the browser.
     * The browser must have an interface request binder registered for this
     * interface and accessible to the calling document's frame.
     */
    static getRemote() {
        let remote = new WallpaperSearchClientRemote;
        remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
        return remote;
    }
}
/**
 * An object which receives request messages for the WallpaperSearchClient
 * mojom interface and dispatches them as callbacks. One callback receiver exists
 * on this object for each message defined in the mojom interface, and each
 * receiver can have any number of listeners added to it.
 */
export class WallpaperSearchClientCallbackRouter {
    helper_internal_;
    $;
    router_;
    setHistory;
    onConnectionError;
    constructor() {
        this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(WallpaperSearchClientRemote);
        this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
        this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
        this.setHistory =
            new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(this.router_);
        this.helper_internal_.registerHandler(1518864526, WallpaperSearchClient_SetHistory_ParamsSpec.$, null, this.setHistory.createReceiverHandler(false /* expectsResponse */), false);
        this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
    }
    /**
     * @param id An ID returned by a prior call to addListener.
     * @return True iff the identified listener was found and removed.
     */
    removeListener(id) {
        return this.router_.removeListener(id);
    }
}
export const KeyLabelSpec = { $: {} };
export const GroupSpec = { $: {} };
export const DescriptorBSpec = { $: {} };
export const DescriptorsSpec = { $: {} };
export const InspirationSpec = { $: {} };
export const InspirationDescriptorsSpec = { $: {} };
export const InspirationGroupSpec = { $: {} };
export const WallpaperSearchResultSpec = { $: {} };
export const ResultDescriptorsSpec = { $: {} };
export const WallpaperSearchHandlerFactory_CreateWallpaperSearchHandler_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_GetDescriptors_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_GetDescriptors_ResponseParamsSpec = { $: {} };
export const WallpaperSearchHandler_GetInspirations_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_GetInspirations_ResponseParamsSpec = { $: {} };
export const WallpaperSearchHandler_GetWallpaperSearchResults_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_GetWallpaperSearchResults_ResponseParamsSpec = { $: {} };
export const WallpaperSearchHandler_SetResultRenderTime_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_SetBackgroundToHistoryImage_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_SetBackgroundToInspirationImage_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_SetBackgroundToWallpaperSearchResult_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_UpdateHistory_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_SetUserFeedback_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_OpenHelpArticle_ParamsSpec = { $: {} };
export const WallpaperSearchHandler_LaunchHatsSurvey_ParamsSpec = { $: {} };
export const WallpaperSearchClient_SetHistory_ParamsSpec = { $: {} };
export const DescriptorDValueSpec = { $: {} };
mojo.internal.Struct(KeyLabelSpec.$, 'KeyLabel', [
    mojo.internal.StructField('key', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('label', 8, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(GroupSpec.$, 'Group', [
    mojo.internal.StructField('category', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('descriptorAs', 8, 0, mojo.internal.Array(KeyLabelSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(DescriptorBSpec.$, 'DescriptorB', [
    mojo.internal.StructField('key', 0, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('label', 8, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('imagePath', 16, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
], [[0, 32],]);
mojo.internal.Struct(DescriptorsSpec.$, 'Descriptors', [
    mojo.internal.StructField('groups', 0, 0, mojo.internal.Array(GroupSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('descriptorB', 8, 0, mojo.internal.Array(DescriptorBSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('descriptorC', 16, 0, mojo.internal.Array(KeyLabelSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 32],]);
mojo.internal.Struct(InspirationSpec.$, 'Inspiration', [
    mojo.internal.StructField('id', 0, 0, mojoBase_mojom_TokenSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('description', 8, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('backgroundUrl', 16, 0, url_mojom_UrlSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('thumbnailUrl', 24, 0, url_mojom_UrlSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 40],]);
mojo.internal.Struct(InspirationDescriptorsSpec.$, 'InspirationDescriptors', [
    mojo.internal.StructField('subject', 0, 0, KeyLabelSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('style', 8, 0, KeyLabelSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('mood', 16, 0, KeyLabelSpec.$, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('color', 24, 0, DescriptorDValueSpec.$, null, true /* nullable */, 0, undefined, undefined),
], [[0, 48],]);
mojo.internal.Struct(InspirationGroupSpec.$, 'InspirationGroup', [
    mojo.internal.StructField('descriptors', 0, 0, InspirationDescriptorsSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('inspirations', 8, 0, mojo.internal.Array(InspirationSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(WallpaperSearchResultSpec.$, 'WallpaperSearchResult', [
    mojo.internal.StructField('id', 0, 0, mojoBase_mojom_TokenSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('image', 8, 0, mojo.internal.String, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('descriptors', 16, 0, ResultDescriptorsSpec.$, null, true /* nullable */, 0, undefined, undefined),
], [[0, 32],]);
mojo.internal.Struct(ResultDescriptorsSpec.$, 'ResultDescriptors', [
    mojo.internal.StructField('subject', 0, 0, mojo.internal.String, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('style', 8, 0, mojo.internal.String, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('mood', 16, 0, mojo.internal.String, null, true /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('color', 24, 0, DescriptorDValueSpec.$, null, true /* nullable */, 0, undefined, undefined),
], [[0, 48],]);
mojo.internal.Struct(WallpaperSearchHandlerFactory_CreateWallpaperSearchHandler_ParamsSpec.$, 'WallpaperSearchHandlerFactory_CreateWallpaperSearchHandler_Params', [
    mojo.internal.StructField('client', 0, 0, mojo.internal.InterfaceProxy(WallpaperSearchClientRemote), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('handler', 8, 0, mojo.internal.InterfaceRequest(WallpaperSearchHandlerPendingReceiver), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(WallpaperSearchHandler_GetDescriptors_ParamsSpec.$, 'WallpaperSearchHandler_GetDescriptors_Params', [], [[0, 8],]);
mojo.internal.Struct(WallpaperSearchHandler_GetDescriptors_ResponseParamsSpec.$, 'WallpaperSearchHandler_GetDescriptors_ResponseParams', [
    mojo.internal.StructField('descriptors', 0, 0, DescriptorsSpec.$, null, true /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(WallpaperSearchHandler_GetInspirations_ParamsSpec.$, 'WallpaperSearchHandler_GetInspirations_Params', [], [[0, 8],]);
mojo.internal.Struct(WallpaperSearchHandler_GetInspirations_ResponseParamsSpec.$, 'WallpaperSearchHandler_GetInspirations_ResponseParams', [
    mojo.internal.StructField('inspirationGroups', 0, 0, mojo.internal.Array(InspirationGroupSpec.$, false), null, true /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(WallpaperSearchHandler_GetWallpaperSearchResults_ParamsSpec.$, 'WallpaperSearchHandler_GetWallpaperSearchResults_Params', [
    mojo.internal.StructField('resultDescriptors', 0, 0, ResultDescriptorsSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(WallpaperSearchHandler_GetWallpaperSearchResults_ResponseParamsSpec.$, 'WallpaperSearchHandler_GetWallpaperSearchResults_ResponseParams', [
    mojo.internal.StructField('status', 0, 0, WallpaperSearchStatusSpec.$, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('results', 8, 0, mojo.internal.Array(WallpaperSearchResultSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(WallpaperSearchHandler_SetResultRenderTime_ParamsSpec.$, 'WallpaperSearchHandler_SetResultRenderTime_Params', [
    mojo.internal.StructField('resultIds', 0, 0, mojo.internal.Array(mojoBase_mojom_TokenSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('time', 8, 0, mojo.internal.Double, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(WallpaperSearchHandler_SetBackgroundToHistoryImage_ParamsSpec.$, 'WallpaperSearchHandler_SetBackgroundToHistoryImage_Params', [
    mojo.internal.StructField('resultId', 0, 0, mojoBase_mojom_TokenSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('descriptors', 8, 0, ResultDescriptorsSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(WallpaperSearchHandler_SetBackgroundToInspirationImage_ParamsSpec.$, 'WallpaperSearchHandler_SetBackgroundToInspirationImage_Params', [
    mojo.internal.StructField('id', 0, 0, mojoBase_mojom_TokenSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('backgroundUrl', 8, 0, url_mojom_UrlSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 24],]);
mojo.internal.Struct(WallpaperSearchHandler_SetBackgroundToWallpaperSearchResult_ParamsSpec.$, 'WallpaperSearchHandler_SetBackgroundToWallpaperSearchResult_Params', [
    mojo.internal.StructField('resultId', 0, 0, mojoBase_mojom_TokenSpec.$, null, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('time', 8, 0, mojo.internal.Double, 0, false /* nullable */, 0, undefined, undefined),
    mojo.internal.StructField('descriptors', 16, 0, ResultDescriptorsSpec.$, null, false /* nullable */, 0, undefined, undefined),
], [[0, 32],]);
mojo.internal.Struct(WallpaperSearchHandler_UpdateHistory_ParamsSpec.$, 'WallpaperSearchHandler_UpdateHistory_Params', [], [[0, 8],]);
mojo.internal.Struct(WallpaperSearchHandler_SetUserFeedback_ParamsSpec.$, 'WallpaperSearchHandler_SetUserFeedback_Params', [
    mojo.internal.StructField('selectedOption', 0, 0, UserFeedbackSpec.$, 0, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Struct(WallpaperSearchHandler_OpenHelpArticle_ParamsSpec.$, 'WallpaperSearchHandler_OpenHelpArticle_Params', [], [[0, 8],]);
mojo.internal.Struct(WallpaperSearchHandler_LaunchHatsSurvey_ParamsSpec.$, 'WallpaperSearchHandler_LaunchHatsSurvey_Params', [], [[0, 8],]);
mojo.internal.Struct(WallpaperSearchClient_SetHistory_ParamsSpec.$, 'WallpaperSearchClient_SetHistory_Params', [
    mojo.internal.StructField('history', 0, 0, mojo.internal.Array(WallpaperSearchResultSpec.$, false), null, false /* nullable */, 0, undefined, undefined),
], [[0, 16],]);
mojo.internal.Union(DescriptorDValueSpec.$, 'DescriptorDValue', {
    'color': {
        'ordinal': 0,
        'type': skia_mojom_SkColorSpec.$,
    },
    'hue': {
        'ordinal': 1,
        'type': mojo.internal.Float,
    },
    'name': {
        'ordinal': 2,
        'type': DescriptorDNameSpec.$,
    },
});
export var DescriptorDValueFieldTags;
(function (DescriptorDValueFieldTags) {
    DescriptorDValueFieldTags[DescriptorDValueFieldTags["COLOR"] = 0] = "COLOR";
    DescriptorDValueFieldTags[DescriptorDValueFieldTags["HUE"] = 1] = "HUE";
    DescriptorDValueFieldTags[DescriptorDValueFieldTags["NAME"] = 2] = "NAME";
})(DescriptorDValueFieldTags || (DescriptorDValueFieldTags = {}));
export function whichDescriptorDValue(u) {
    if (u.color !== null && u.color !== undefined) {
        return DescriptorDValueFieldTags.COLOR;
    }
    if (u.hue !== null && u.hue !== undefined) {
        return DescriptorDValueFieldTags.HUE;
    }
    if (u.name !== null && u.name !== undefined) {
        return DescriptorDValueFieldTags.NAME;
    }
    throw new Error("no union field has been set, this is an illegal state");
}
export const browserProxyFactory = new MojoBrowserProxyFactory(WallpaperSearchHandlerRemote, WallpaperSearchClientCallbackRouter, (remote, receiver) => WallpaperSearchHandlerFactory.getRemote().createWallpaperSearchHandler(remote, receiver));
