import{v as p,r as t,ay as x,h as c,o as f,aE as b,hG as k,i as n,hH as V,F as E,a9 as g,p as _,hI as y,A as C}from"./index-9PRMimni.js";const M=["value","disabled"],I={__name:"index",setup(O){const v=t("1"),d=t([{value:1,label:"1 月",disabled:!1},{value:2,label:"2 月",disabled:!1},{value:3,label:"3 月",disabled:!1},{value:4,label:"4 月",disabled:!1},{value:5,label:"5 月",disabled:!1},{value:6,label:"6 月",disabled:!1},{value:7,label:"7 月",disabled:!1},{value:8,label:"8 月",disabled:!1},{value:9,label:"9 月",disabled:!1},{value:10,label:"10 月",disabled:!1},{value:11,label:"11 月",disabled:!1},{value:12,label:"12 月",disabled:!1}]),l=t([]),o=()=>{const i=parseInt(v.value);switch(d.value.forEach(e=>{e.disabled=!1}),l.value=[],i){case 1:d.value.forEach(e=>{e.disabled=!0,l.value.push(e.value)});break;case 2:d.value.forEach(e=>{e.value>2&&(e.disabled=!0)});break;case 3:d.value.forEach(e=>{e.value>4&&(e.disabled=!0)});break;case 4:d.value.forEach(e=>{e.value>3&&(e.disabled=!0)});break;case 6:d.value.forEach(e=>{e.value>6&&(e.disabled=!0)});break}},r=()=>{const i=parseInt(v.value);if(i===12&&l.value.length>1)l.value=[l.value[l.value.length-1]];else if(i!==12&&l.value.length>0){const e=l.value[0];d.value.forEach(a=>{if(i===6){const s=a.value===e||a.value===e+6;if(a.disabled=!s,s)l.value.includes(a.value)||l.value.push(a.value);else{const u=l.value.indexOf(a.value);u>-1&&l.value.splice(u,1)}}else if(i===3){const s=(a.value-e)%4===0&&a.value>=e;if(a.disabled=!s,s)l.value.includes(a.value)||l.value.push(a.value);else{const u=l.value.indexOf(a.value);u>-1&&l.value.splice(u,1)}}else if(i===2){const s=(a.value-e)%2===0&&a.value>=e;if(a.disabled=!s,s)l.value.includes(a.value)||l.value.push(a.value);else{const u=l.value.indexOf(a.value);u>-1&&l.value.splice(u,1)}}else if(i===4){const s=(a.value-e)%4===0&&a.value>=e;if(a.disabled=!s,s)l.value.includes(a.value)||l.value.push(a.value);else{const u=l.value.indexOf(a.value);u>-1&&l.value.splice(u,1)}}else{const s=(a.value-e)%i===0;a.disabled=!s}})}};return x(v,o,{immediate:!0}),(i,e)=>(f(),c("div",null,[b(n("select",{"onUpdate:modelValue":e[0]||(e[0]=a=>v.value=a),onChange:o},e[2]||(e[2]=[V('<option value="1" data-v-486ed036>一年 12 次</option><option value="2" data-v-486ed036>一年 6 次</option><option value="3" data-v-486ed036>一年 4 次</option><option value="4" data-v-486ed036>一年 3 次</option><option value="6" data-v-486ed036>一年 2 次</option><option value="12" data-v-486ed036>一年 1 次</option>',6)]),544),[[k,v.value]]),(f(!0),c(E,null,g(d.value,(a,s)=>(f(),c("div",{key:s},[b(n("input",{type:"checkbox",value:a.value,"onUpdate:modelValue":e[1]||(e[1]=u=>l.value=u),disabled:a.disabled,onChange:r},null,40,M),[[y,l.value]]),_(" "+C(a.label),1)]))),128))]))}},B=p(I,[["__scopeId","data-v-486ed036"]]);export{B as default};
