import{c as e,h as l,k as a,J as r,x as o,e as s,p as c,l as u,I as t,aY as m,q as d,v as i,C as n,D as p,N as b,ag as k,ah as v,a7 as f,a4 as y}from"./base-lib.js?v=1761009159";import{g as _,bx as j}from"./useStore4.js?v=1761009159";import{m as h}from"./validator.js?v=1761009159";import{M as T,I as g}from"./utils-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index104.js?v=1761009159";import"./column.js?v=1761009159";const w={style:{float:"left"}},V={style:{float:"left"}},x=e({__name:"set-install-url",props:{compData:{default:()=>({})}},emits:["close"],setup(e,{expose:x,emit:z}){const D=z,{getSet:S}=_(),U=l({installType:"default",url:""}),q=[{label:"默认",value:"default"},{label:"自定义",value:"custom"},{label:"二进制安装",value:"binary"}],A=[{label:"mirrors.aliyun.com/docker-ce(阿里云镜像)",value:"mirrors.aliyun.com/docker-ce"},{label:"mirrors.tencent.com/docker-ce(腾讯云镜像)",value:"mirrors.tencent.com/docker-ce"},{label:"repo.huaweicloud.com/docker-ce(华为云镜像)",value:"repo.huaweicloud.com/docker-ce"},{label:"mirror.azure.cn/docker-ce(微软 Azure 镜像)",value:"mirror.azure.cn/docker-ce"},{label:"mirrors.163.com/docker-ce(网易云镜像)",value:"mirrors.163.com/docker-ce"},{label:"mirrors.tuna.tsinghua.edu.cn/docker-ce(清华大学 TUNA 镜像)",value:"mirrors.tuna.tsinghua.edu.cn/docker-ce"},{label:"mirrors.pku.edu.cn/docker-ce(北京大学镜像)",value:"mirrors.pku.edu.cn/docker-ce"},{label:"mirrors.nju.edu.cn/docker-ce(南京大学镜像)",value:"mirrors.nju.edu.cn/docker-ce"},{label:"mirror.sjtu.edu.cn/docker-ce(上海交通大学镜像)",value:"mirror.sjtu.edu.cn/docker-ce"},{label:"mirrors.ustc.edu.cn/docker-ce(中国科技大学镜像)",value:"mirrors.ustc.edu.cn/docker-ce"},{label:"mirror.iscas.ac.cn/docker-ce(中国科学院计算技术研究所镜像)",value:"mirror.iscas.ac.cn/docker-ce"},{label:"download.docker.com(Docker 官方镜像)",value:"download.docker.com"}];return x({onConfirm:async()=>{if(""===U.url&&"custom"==U.installType)return void T.error("请选择镜像源");const e={type:"binary"===U.installType?1:0};"custom"==U.installType&&(e.url=U.url),await g({request:j(e),message:!0,success:({status:e})=>{e&&(h(),S(),D("close"))}})}}),(e,l)=>{const _=k,j=v,h=f,T=y;return a(),r(T,{ref:"urlFormRef",class:"p-[1.6rem]",size:"small",model:c(U),"label-position":"right",onSubmit:l[2]||(l[2]=b((()=>{}),["prevent"]))},{default:o((()=>[s(h,{prop:"installType",label:"安装方式"},{default:o((()=>[s(j,{modelValue:c(U).installType,"onUpdate:modelValue":l[0]||(l[0]=e=>c(U).installType=e),class:"!w-[47rem]",placeholder:"请选择镜像源"},{default:o((()=>[(a(),u(t,null,m(q,(e=>s(_,{key:e.value,label:e.label,value:e.value},{default:o((()=>[d("span",w,i(e.label),1)])),_:2},1032,["label","value"]))),64))])),_:1},8,["modelValue"])])),_:1}),n(s(h,{prop:"registry_mirrors_address",label:"镜像源"},{default:o((()=>[s(j,{modelValue:c(U).url,"onUpdate:modelValue":l[1]||(l[1]=e=>c(U).url=e),class:"!w-[47rem]",placeholder:"请选择镜像源"},{default:o((()=>[(a(),u(t,null,m(A,(e=>s(_,{key:e.value,label:e.label,value:e.value},{default:o((()=>[d("span",V,i(e.label),1)])),_:2},1032,["label","value"]))),64))])),_:1},8,["modelValue"])])),_:1},512),[[p,"custom"==c(U).installType]])])),_:1},8,["model"])}}});export{x as default};
