(function(n,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("@vue-js-cron/core"),require("naive-ui"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@vue-js-cron/core","naive-ui","vue"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.CronNaive={},n.CronCore,n.naive,n.Vue))})(this,function(n,r,d,e){"use strict";const h={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},g=[e.createElementVNode("path",{d:"M289.94 256l95-95A24 24 0 0 0 351 127l-95 95l-95-95a24 24 0 0 0-34 34l95 95l-95 95a24 24 0 1 0 34 34l95-95l95 95a24 24 0 0 0 34-34z",fill:"currentColor"},null,-1)],k=e.defineComponent({name:"Close",render:function(t,l){return e.openBlock(),e.createElementBlock("svg",h,g)}}),b=e.defineComponent({inheritAttrs:!1,name:"CustomSelect",components:{NButton:d.NButton,NPopover:d.NPopover,NGrid:d.NGrid,NGridItem:d.NGridItem,NTag:d.NTag,NIcon:d.NIcon,Close:k},props:{...r.selectProps(),buttonProps:{type:Object,default:()=>{}},popoverProps:{type:Object,default:()=>{}},hideOnClick:{type:Boolean,default:!0}},emits:["update:model-value"],setup(o,t){const l=r.setupSelect(o,()=>o.modelValue,t),i=e.ref(!1);return{...l,show:i,select:m=>{l.select(m),o.hideOnClick&&(i.value=!1)}}}}),D="",_=(o,t)=>{const l=o.__vccOpts||o;for(const[i,a]of t)l[i]=a;return l};function w(o,t,l,i,a,m){const p=e.resolveComponent("close"),s=e.resolveComponent("n-icon"),u=e.resolveComponent("n-button"),S=e.resolveComponent("n-tag"),T=e.resolveComponent("n-grid-item"),E=e.resolveComponent("n-grid"),O=e.resolveComponent("n-popover");return e.openBlock(),e.createElementBlock("span",null,[e.createVNode(O,e.mergeProps({show:o.show,"onUpdate:show":t[1]||(t[1]=c=>o.show=c),trigger:"click"},o.popoverProps,{disabled:o.disabled}),{trigger:e.withCtx(()=>[e.createVNode(u,e.mergeProps(o.buttonProps,{"icon-placement":"right",disabled:o.disabled}),e.createSlots({default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.selection??o.selectedStr)+" ",1)]),_:2},[o.clearable&&!o.isEmpty?{name:"icon",fn:e.withCtx(()=>[e.createVNode(s,{onClick:[o.clear,t[0]||(t[0]=e.withModifiers(()=>{},["stop"]))]},{default:e.withCtx(()=>[e.createVNode(p)]),_:1},8,["onClick"])]),key:"0"}:void 0]),1040,["disabled"])]),default:e.withCtx(()=>[e.createVNode(E,{class:"vcron-n-grid",cols:o.cols},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,c=>(e.openBlock(),e.createBlock(T,{key:c.vaue},{default:e.withCtx(()=>[e.createVNode(S,{checked:o.has(c),onUpdateChecked:G=>o.select(c),checkable:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.text),1)]),_:2},1032,["checked","onUpdateChecked"])]),_:2},1024))),128))]),_:1},8,["cols"])]),_:1},16,["show","disabled"])])}const y=_(b,[["render",w],["__scopeId","data-v-f7c78d80"]]),f=()=>({buttonProps:{type:Object,default(){return{}}},dropdownProps:{type:Object,default:()=>{}},...r.cronCoreProps()}),V=e.defineComponent({name:"CronNaive",components:{CustomSelect:y},props:f(),emits:["update:model-value","update:period","error"],setup(o,t){return r.setupCron(o,t)}}),I="",P={class:"vcron-n-spacer"},B={class:"vcron-n-spacer"};function $(o,t,l,i,a,m){const p=e.resolveComponent("custom-select");return e.openBlock(),e.createElementBlock("div",null,[e.createTextVNode(e.toDisplayString(o.period.prefix.value)+" ",1),e.createElementVNode("div",P,[e.createVNode(p,{"model-value":o.period.selected.value.id,"item-value":"id",items:o.period.items,"onUpdate:modelValue":t[0]||(t[0]=s=>o.period.select(s)),disabled:o.disabled,"button-props":o.buttonProps},null,8,["model-value","items","disabled","button-props"])]),e.createTextVNode(" "+e.toDisplayString(o.period.suffix.value)+" ",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.selected,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s.id},[e.createTextVNode(e.toDisplayString(s.prefix.value)+" ",1),e.createElementVNode("div",B,[e.createVNode(p,{"model-value":s.selected.value,"onUpdate:modelValue":u=>s.select(u),items:s.items,cols:o.cols[s.id]||1,selection:s.text.value,multiple:"",clearable:"",disabled:o.disabled,"button-props":o.buttonProps,"dropdown-props":o.dropdownProps,hideOnClick:!1},null,8,["model-value","onUpdate:modelValue","items","cols","selection","disabled","button-props","dropdown-props"])]),e.createTextVNode(" "+e.toDisplayString(s.suffix.value),1)],64))),128))])}const C=_(V,[["render",$]]),N={install:o=>{o.component("CronNaive",C)}};n.CronNaive=C,n.CronNaivePlugin=N,n.cronNaiveProps=f,n.default=N,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); //# sourceMappingURL=naive-ui.umd.cjs.map