'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
require('../config/index.js');
var apiUrl = require('../config/api-url.js');

"use strict";
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  __name: "api-url",
  props: apiUrl.apiUrlProps,
  emits: apiUrl.apiUrlEmits,
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emits = __emit;
    const disabled = vue.inject("disabled");
    const innerValue = vue.ref(props.value);
    const handleChange = () => {
      emits("change", innerValue.value);
      emits("update:value", innerValue.value);
    };
    vue.watch(
      () => props.value,
      (val) => {
        innerValue.value = val;
      },
      {
        deep: true
      }
    );
    return (_ctx, _cache) => {
      const _component_ll_select = vue.resolveComponent("ll-select");
      const _component_ll_input = vue.resolveComponent("ll-input");
      const _component_a_input_group = vue.resolveComponent("a-input-group");
      return vue.openBlock(), vue.createBlock(_component_a_input_group, { compact: "" }, {
        default: vue.withCtx(() => [
          vue.createVNode(_component_ll_select, {
            value: innerValue.value.method,
            "onUpdate:value": _cache[0] || (_cache[0] = ($event) => innerValue.value.method = $event),
            disabled: vue.unref(disabled),
            options: vue.unref(apiUrl.methods),
            style: { "width": "150px" },
            "allow-clear": false,
            onChange: handleChange
          }, null, 8, ["value", "disabled", "options"]),
          vue.createVNode(_component_ll_input, {
            value: innerValue.value.url,
            "onUpdate:value": _cache[1] || (_cache[1] = ($event) => innerValue.value.url = $event),
            disabled: vue.unref(disabled),
            style: { "width": "50%" },
            placeholder: "\u8BF7\u8F93\u5165\u5730\u5740\uFF08\u53BB\u9664\u524D\u7F6EURL)",
            onInput: handleChange
          }, null, 8, ["value", "disabled"])
        ]),
        _: 1
        /* STABLE */
      });
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=api-url.vue2.js.map
