import '../../../utils/index.mjs';
import { buildProps } from '../../../utils/props/runtime.mjs';

"use strict";
const httpUriOptions = [
  {
    label: "Https://",
    value: "https://"
  },
  {
    label: "Http://",
    value: "http://"
  }
];
const getHttpMethodUri = (uri) => {
  let prefix = "https://";
  let url = uri ? uri : "";
  const currentUri = uri ? uri.toLowerCase() : "";
  try {
    const urlObject = new URL(currentUri);
    if (!prefix.includes(urlObject.protocol)) {
      prefix = "http://";
    }
    url = currentUri.replace(prefix, "");
  } catch (error) {
  }
  return {
    prefix,
    url
  };
};
const uriInputProps = buildProps({
  value: {
    type: [String, null],
    default: ""
  },
  suffix: {
    type: String,
    default: ""
  },
  // 后缀值
  addonAfter: {
    type: String,
    default: ""
  },
  disabled: {
    type: Boolean,
    default: false
  },
  placeholder: {
    type: String,
    default: "\u8BF7\u8F93\u5165"
  },
  // 显示复制
  showCopy: {
    type: Boolean,
    default: true
  }
});
const uriInputEmits = {
  "update:value": (value) => typeof value === "string",
  change: (value) => typeof value === "string"
};

export { getHttpMethodUri, httpUriOptions, uriInputEmits, uriInputProps };
//# sourceMappingURL=uri-input.mjs.map
