<commit_before>// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import withObservables from '@nozbe/with-observables';

import AppsManager from '@managers/apps_manager';

import Autocomplete from './autocomplete';

type OwnProps = {
    serverUrl?: string;
}

const enhanced = withObservables(['serverUrl'], ({serverUrl}: OwnProps) => ({
    isAppsEnabled: serverUrl ? AppsManager.observeIsAppsEnabled(serverUrl) : false,
}));

export default enhanced(Autocomplete);
<commit_msg>[Bug] Emit boolean with "of" operator (#6729)<commit_after>// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import withObservables from '@nozbe/with-observables';
import {of as of$} from 'rxjs';

import AppsManager from '@managers/apps_manager';

import Autocomplete from './autocomplete';

type OwnProps = {
    serverUrl?: string;
}

const enhanced = withObservables(['serverUrl'], ({serverUrl}: OwnProps) => ({
    isAppsEnabled: serverUrl ? AppsManager.observeIsAppsEnabled(serverUrl) : of$(false),
}));

export default enhanced(Autocomplete);

{'fraction_non_alphanumeric': 0.12987012987012986, 'fraction_numerical': 0.01038961038961039, 'mean_word_length': 5.605714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6327328', 'n_tokens_mistral': 357, 'n_tokens_neox': 330, 'n_words': 96}