# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

Classes = [
    {
        'js_name': 'logins',
        'cid': '{cb9e0de8-3598-4ed7-857b-827f011ad5d8}',
        'contract_ids': ['@mozilla.org/login-manager;1'],
        'interfaces': ['nsILoginManager'],
        'esModule': 'resource://gre/modules/LoginManager.sys.mjs',
        'constructor': 'LoginManager',
    },
    {
        'cid': '{749e62f4-60ae-4569-a8a2-de78b649660e}',
        'contract_ids': ['@mozilla.org/passwordmanager/authpromptfactory;1'],
        'esModule': 'resource://gre/modules/LoginManagerAuthPrompter.sys.mjs',
        'constructor': 'LoginManagerAuthPromptFactory',
    },
    {
        'cid': '{2bdac17c-53f1-4896-a521-682ccdeef3a8}',
        'contract_ids': ['@mozilla.org/login-manager/autocompletesearch;1'],
        'esModule': 'resource://gre/modules/LoginAutoComplete.sys.mjs',
        'constructor': 'LoginAutoComplete',
    },
    {
        'cid': '{8aa66d77-1bbb-45a6-991e-b8f47751c291}',
        'contract_ids': ['@mozilla.org/login-manager/authprompter;1'],
        'esModule': 'resource://gre/modules/LoginManagerAuthPrompter.sys.mjs',
        'constructor': 'LoginManagerAuthPrompter',
    },
    {
        'cid': '{0f2f347c-1e4f-40cc-8efd-792dea70a85e}',
        'contract_ids': ['@mozilla.org/login-manager/loginInfo;1'],
        'esModule': 'resource://gre/modules/LoginInfo.sys.mjs',
        'constructor': 'nsLoginInfo',
    },
    {
        'cid': '{dc6c2976-0f73-4f1f-b9ff-3d72b4e28309}',
        'contract_ids': ['@mozilla.org/login-manager/crypto/SDR;1'],
        'esModule': 'resource://gre/modules/crypto-SDR.sys.mjs',
        'constructor': 'LoginManagerCrypto_SDR',
    },
]

if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] not in ('android', 'uikit'):
     Classes += [
        {
            'cid': '{c47ff942-9678-44a5-bc9b-05e0d676c79c}',
            'contract_ids': ['@mozilla.org/login-manager/prompter;1'],
            'esModule': 'resource://gre/modules/LoginManagerPrompter.sys.mjs',
            'constructor': 'LoginManagerPrompter',
        },
        {
            'cid': '{dc185a77-ba88-4caa-8f16-465253f7599a}',
            'contract_ids': [
                '@mozilla.org/autocomplete/search;1?name=login-doorhanger-username',
                '@mozilla.org/autocomplete/search;1?name=login-doorhanger-password'
            ],
            'esModule': 'resource://gre/modules/AutoCompleteSimpleSearch.sys.mjs',
            'constructor': 'AutoCompleteSimpleSearch',
        },
    ]
