import{d as h,s as b,p as O,$,g as _,i as C}from"./index-DR269vK4.js";import{o as f,b as g,aq as y,a4 as v,ao as m,ar as j}from"./index-BJD7BFLS.js";const x=({state:t,props:n})=>()=>({height:n.height||t.height,margin:n.margin||t.margin,fontSize:n.fontSize}),T=({props:t})=>()=>{const n={borderTopStyle:t.borderStyle};return t.color&&Object.assign(n,{borderTopColor:t.color}),n},k=({props:t})=>()=>{const n={left:"unset",right:"unset"},e="5%";return t.contentPosition==="left"?n.left=t.offset||e:t.contentPosition==="right"&&(n.right=t.offset||e),n},A=({state:t,props:n,vm:e,nextTick:r})=>()=>{const a="12px";n.direction==="vertical"?t.height=n.height||a:r(()=>{const o=e.$refs.text&&e.$refs.text.offsetHeight;t.height=n.height||o?o+"px":"auto"})},D=["state"],z=(t,{reactive:n,onMounted:e,computed:r},{vm:a,nextTick:o})=>{const s="16px 0",u="0 8px",i={},d=n({height:"auto",margin:t.direction==="vertical"?u:s,lineStyle:r(()=>i.computedLineStyle()),textStyle:r(()=>i.computedTextStyle()),rootStyle:r(()=>i.computedRootStyle())});return Object.assign(i,{state:d,computedLineStyle:T({props:t}),computedTextStyle:k({props:t}),computedRootStyle:x({props:t,state:d}),setDividerHeight:A({props:t,state:d,vm:a,nextTick:o})}),e(()=>{i.setDividerHeight()}),i};function H(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=I(t))||n){e&&(t=e);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I(t,n){if(t){if(typeof t=="string")return S(t,n);var e={}.toString.call(t).slice(8,-1);return e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set"?Array.from(t):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?S(t,n):void 0}}function S(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);e<n;e++)r[e]=t[e];return r}var P=function(n,e){for(var r=n.__vccOpts||n,a=H(e),o;!(o=a()).done;){var s=o.value,u=s[0],i=s[1];r[u]=i}return r};function c(){return c=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},c.apply(null,arguments)}var w=h({props:[].concat(O,["direction","color","borderStyle","contentPosition","contentColor","contentBackgroundColor","status","margin","offset","fontSize","height"]),setup:function(n,e){return b({props:n,context:e,renderless:z,api:D})}});function B(t,n,e,r,a,o){return f(),g("div",{class:y(["tiny-divider","tiny-divider--"+t.direction,t.direction==="vertical"?"tiny-divider--"+t.status:""]),style:v(t.state.rootStyle)},[t.direction!=="vertical"?(f(),g("div",{key:0,style:v(c({"border-color":t.color},t.state.lineStyle)),class:y(["tiny-divider-line","tiny-divider--"+t.status])},null,6)):m("v-if",!0),t.slots.default?(f(),g("div",{key:1,ref:"text",class:y(["tiny-divider__text"]),style:v(c({color:t.contentColor,"background-color":t.contentBackgroundColor},t.state.textStyle))},[j(t.$slots,"default")],4)):m("v-if",!0)],6)}var L=P(w,[["render",B]]),M={TINY_MODE:"pc"};function p(){return p=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},p.apply(null,arguments)}var E=function(n){var e;return typeof process=="object"&&((e=M)==null||e.TINY_MODE),L},N={},R=p({},C,{_constants:{type:Object,default:function(){return N}},direction:{type:String,default:"horizontal"},color:{type:String,default:""},borderStyle:{type:String,default:"solid"},contentPosition:{type:String,default:"center"},contentColor:{type:String,default:""},contentBackgroundColor:{type:String,default:""},fontSize:{type:String,default:function(){return"14px"}},margin:String,offset:String,height:String,status:{type:String,values:["default","success","warning","error","info"],default:function(){return"default"}}}),l=h({name:_+"Divider",props:R,setup:function(n,e){return $({props:n,context:e,template:E})}}),Y="3.undefined";l.install=function(t){t.component(l.name,l)};l.version=Y;export{l as D};
