{$layout} {$template "menu"}

<div class="http-config-container">
    <form class="ui form http-config-form" data-tea-action="$" data-tea-success="success">
        <csrf-token></csrf-token>
        <div class="config-section">
            <div class="config-item">
                <div class="item-label">域名 *</div>
                <div class="item-content">
                    <textarea rows="15" name="names" placeholder="每行一个域名" ref="focus"></textarea>
                </div>
            </div>
            <div class="config-item">
                <div class="item-label">匹配条件</div>
                <div class="item-content">
                    <div class="config-section">
                        <div class="config-item">
                            <div class="item-label">记录名</div>
                            <div class="item-content">
                                <input type="text" name="searchName" />
                                <p class="comment">只有不为空时才生效。</p>
                            </div>
                        </div>
                        <div class="config-item">
                            <div class="item-label">记录值</div>
                            <div class="item-content">
                                <input type="text" name="searchValue" />
                                <p class="comment">只有不为空时才生效。</p>
                            </div>
                        </div>
                        <div class="config-item">
                            <div class="item-label">记录类型</div>
                            <div class="item-content">
                                <b-select
                                    name="searchType"
                                    v-model="searchType"
                                    auto-width
                                    :options="[
                                        ...types.map(type => ({
                                            label: type.type,
                                            value: type.type,
                                        })),
                                    ]"
                                ></b-select>
                            </div>
                        </div>
                        <div class="config-item">
                            <div class="item-label">线路</div>
                            <div class="item-content">
                                <ns-routes-selector name="searchRouteCodes"></ns-routes-selector>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <submit-btn>批量删除</submit-btn>
    </form>
</div>
