// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import {withDatabase, withObservables} from '@nozbe/watermelondb/react'; import Files from '@components/files/files'; import {observeCanDownloadFiles, observeConfigBooleanValue} from '@queries/servers/system'; import type {WithDatabaseArgs} from '@typings/database/database'; const enhance = withObservables([], ({database}: WithDatabaseArgs) => { return { canDownloadFiles: observeCanDownloadFiles(database), publicLinkEnabled: observeConfigBooleanValue(database, 'EnablePublicLink'), }; }); export default withDatabase(enhance(Files));