import{O as g}from"./index.4f243ca1.js";import{s as r}from"./index.module.5fa78ceb.js";import{m as y,w,O as c,d as f,aR as x,U as B,k as e,L as S,y as z,R as L,B as O,l as F}from"./index.879f7421.js";import{C as m}from"./index.4aec72fa.js";import{F as n}from"./index.00975bf6.js";import{C as N}from"./index.9a3a3b84.js";const[P,s]=y("switch"),U={size:w,loading:Boolean,disabled:Boolean,modelValue:c,activeColor:String,inactiveColor:String,activeValue:{type:c,default:!0},inactiveValue:{type:c,default:!1}};var G=f({name:P,props:U,emits:["change","update:modelValue"],setup(a,{emit:t,slots:o}){const i=()=>a.modelValue===a.activeValue,v=()=>{if(!a.disabled&&!a.loading){const l=i()?a.inactiveValue:a.activeValue;t("update:modelValue",l),t("change",l)}},h=()=>{if(a.loading){const l=i()?a.activeColor:a.inactiveColor;return e(S,{class:s("loading"),color:l},null)}if(o.node)return o.node()};return x(()=>a.modelValue),()=>{var l;const{size:p,loading:C,disabled:u,activeColor:V,inactiveColor:k}=a,d=i(),b={fontSize:B(p),backgroundColor:d?V:k};return e("div",{role:"switch",class:s({on:d,loading:C,disabled:u}),style:b,tabindex:u?void 0:0,"aria-checked":d,onClick:v},[e("div",{class:s("node")},[h()]),(l=o.background)==null?void 0:l.call(o)])}}});const R=z(G);var q=f({name:"address-operation",setup(){const a=L({checked:!1});return()=>e("div",{class:r.operation},[e(m,{inset:!0,class:r.form},{default:()=>[e(n,{label:"\u6536\u8D27\u4EBA",placeholder:"\u8BF7\u8F93\u5165\u6536\u8D27\u4EBA\u59D3\u540D"},null),e(n,{label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165\u6536\u8D27\u4EBA\u4EBA\u624B\u673A\u53F7"},null),e(n,{label:"\u6240\u5728\u5730\u533A",placeholder:"\u7701\u3001\u5E02\u3001\u533A\u3001\u8857\u9053",readonly:!0,isLink:!0},null),e(n,{label:"\u8BE6\u7EC6\u5730\u5740",placeholder:"\u5C0F\u533A\u697C\u680B/\u4E61\u6751\u540D\u79F0",type:"textarea",rows:3},null)]}),e(m,{inset:!0,style:{marginTop:"12px"}},{default:()=>[e(N,{title:"\u8BBE\u7F6E\u4E3A\u9ED8\u8BA4\u5730\u5740",center:!0,class:r.default},{value:()=>e(R,{modelValue:a.checked,"onUpdate:modelValue":t=>a.checked=t,size:"23px"},null)})]}),e(g,{position:"bottom"},{default:()=>[e("div",{class:"btnGroup"},[e(O,{type:"primary",block:!0,round:!0},{default:()=>[F("\u786E\u8BA4")]})])]})])}});export{q as default};
