{$layout}
{$template "menu_domain"}

<div class="http-config-container">
  <form class="ui form http-config-form" method="post" data-tea-action="$" data-tea-success="success">
    <csrf-token></csrf-token>
    <input type="hidden" name="domainId" :value="domain.id"/>
    
    <div class="config-section">
      <div class="section-title">
        <i class="icon globe"></i>
        域名设置
      </div>
      
      <div class="config-item">
        <div class="item-label">
          <i class="icon at"></i>
          域名 *
        </div>
        <div class="item-content">
          {{domain.name}}
        </div>
      </div>
      
      <div class="config-item" v-show="dnsHosts != null && dnsHosts.length > 0">
        <div class="item-label">
          <i class="icon server"></i>
          DNS服务器
        </div>
        <div class="item-content">
          <span v-for="host in dnsHosts" class="ui basic small label">{{host}}</span>
        </div>
      </div>
      
      <div class="config-item" v-if="hasGroups">
        <div class="item-label">
          <i class="icon folder"></i>
          所属分组
        </div>
        <div class="item-content">
          <ns-domain-group-selector :v-domain-group-id="domain.groupId" ref="groupSelector"></ns-domain-group-selector>
        </div>
      </div>
      
      <div class="config-item">
        <div class="item-label">
          <i class="icon toggle on"></i>
          启用
        </div>
        <div class="item-content">
          <p-switch name="isOn" value="1" v-model="domain.isOn"></p-switch>
        </div>
      </div>
    </div>
    
    <submit-btn></submit-btn>
  </form>
</div>