// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import '../../ui/legacy/legacy.js';
import '../../ui/components/buttons/buttons.js';
import '../../ui/kit/kit.js';
import * as Common from '../../core/common/common.js';
import * as i18n from '../../core/i18n/i18n.js';
import * as Persistence from '../../models/persistence/persistence.js';
import * as Buttons from '../../ui/components/buttons/buttons.js';
import * as UI from '../../ui/legacy/legacy.js';
import {html, render} from '../../ui/lit/lit.js';
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
import {EditFileSystemView} from './EditFileSystemView.js';
import workspaceSettingsTabStyles from './workspaceSettingsTab.css.js';
const UIStrings = {
/**
* @description Text of a DOM element in Workspace Settings Tab of the Workspace settings in Settings
*/
workspace: 'Workspace',
/**
* @description Text of a DOM element in Workspace Settings Tab of the Workspace settings in Settings
*/
mappingsAreInferredAutomatically: 'Mappings are inferred automatically.',
/**
* @description Text of the add button in Workspace Settings Tab of the Workspace settings in Settings
*/
addFolder: 'Add folder',
/**
* @description Label element text content in Workspace Settings Tab of the Workspace settings in Settings
*/
folderExcludePattern: 'Exclude from workspace',
/**
* @description Label for an item to remove something
*/
remove: 'Remove',
} as const;
const str_ = i18n.i18n.registerUIStrings('panels/settings/WorkspaceSettingsTab.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
export interface WorkspaceSettingsTabInput {
excludePatternSetting: Common.Settings.RegExpSetting;
fileSystems: Array<{displayName: string, fileSystem: Persistence.IsolatedFileSystem.IsolatedFileSystem}>;
onAddClicked: () => void;
onRemoveClicked: (fileSystem: Persistence.IsolatedFileSystem.IsolatedFileSystem) => void;
}
export type View = (input: WorkspaceSettingsTabInput, output: object, target: HTMLElement) => void;
export const DEFAULT_VIEW: View = (input, _output, target) => {
// clang-format off
render(html`