{{!
  Copyright IBM Corp. 2016, 2025
  SPDX-License-Identifier: BUSL-1.1
}}

<Toolbar>
  <ToolbarActions>
    {{#if this.model.config.mode}}
      <ToolbarLink
        @route="mode.secondaries.config-edit"
        @model={{this.model.config.id}}
        data-test-replication-link="edit-mount-config"
      >
        Edit config
      </ToolbarLink>
    {{else}}
      <ToolbarLink
        @route="mode.secondaries.config-create"
        @model={{this.model.config.id}}
        data-test-replication-link="create-mount-config"
      >
        Create config
      </ToolbarLink>
    {{/if}}
  </ToolbarActions>
</Toolbar>
<div class="box is-fullwidth is-shadowless is-marginless">
  <h4 class="title is-5 is-marginless">
    Mount filter config for
    <code>{{this.model.config.id}}</code>
  </h4>
</div>
{{#if this.model.config.mode}}
  <div class="box is-fullwidth is-shadowless">
    <InfoTableRow @label="Mode" @value={{this.model.config.mode}} data-test-mount-config-mode={{true}} />
    <InfoTableRow @label="Paths" @value={{this.model.config.paths}}>
      <ul class="list--comma" data-test-mount-config-paths={{true}}>
        {{#each this.model.config.paths as |path|}}
          <li>
            <code class="has-text-black">{{path}}</code>
          </li>
        {{/each}}
      </ul>
    </InfoTableRow>
  </div>
{{else}}
  <Hds::ApplicationState class="top-padding-32 is-marginless" as |A|>
    <A.Header @title="No config yet" @titleTag="h2" data-test-empty-state-title />
    <A.Body @text="Performance Mount Filtering is not configured for this secondary." data-test-empty-state-message />
  </Hds::ApplicationState>
{{/if}}