import{createCommentVNode as e,createElementBlock as t,createTextVNode as n,onUnmounted as r,openBlock as i,ref as a,toDisplayString as o,unref as s}from"/vue.js";var c={class:`nc-clock`},l={key:0},u=Object.assign({name:`NcClock`},{__name:`nc-clock`,props:{displaySeconds:{type:Boolean,default:!0},twelveHour:{type:Boolean,default:void 0}},setup(u){let d=u;function f(e){return e<10?`0`+e:e}function p(){return new Date}function m(){return f(p().getSeconds())}function h(){return f(p().getMinutes())}function g(e){let t=p().getHours();return e&&t>12&&(t-=12),f(t)}let _=a(h()),v=a(g(d.twelveHour)),y=a(m()),b=setInterval(function(){_.value=h(),v.value=g(d.twelveHour),d.displaySeconds&&(y.value=m())},1e3);return r(()=>{clearInterval(b)}),(r,a)=>(i(),t(`span`,c,[n(o(s(v))+`:`+o(s(_)),1),u.displaySeconds?(i(),t(`span`,l,`:`+o(s(y)),1)):e(``,!0)]))}});export{u as default};