import initCtx from "@/utils/ctx.js";

export default function () {
	const {utils, Tea} = initCtx(this)

	let allServerNames = this.serverNames.$copy();

	this.keyword = ""

	this.$delay(function () {
		let that = this
		this.$watch(() => this.keyword, function (keyword) {
			that.serverNames = allServerNames.$findAll(function (k, serverName) {
				return utils.match(serverName, keyword)
			})
		})
	})
}