import{o as e}from"./chunk-mlkTr37E.js";import{t}from"./i18n-zSZZZ0Cc.js";import{t as n}from"./moment-B1wZlorQ.js";var r=e(n()),i={number:.05,text:`5%`},a=[{label:t.t(`FLASHSALE_STATUS_BY.SCHEDULER`),value:`scheduler`,count:0},{label:t.t(`FLASHSALE_STATUS_BY.NEXT`),value:`next`,count:0},{label:t.t(`FLASHSALE_STATUS_BY.CURRENT`),value:`current`,count:0},{label:t.t(`FLASHSALE_STATUS_BY.END`),value:`end`,count:0},{label:t.t(`FLASHSALE_STATUS_SAVED`),value:`save`,count:0}],o=[{value:`priceOrginal`,text:t.t(`REDUCE_PRICE_BY_ORIGNAL`)},{value:`priceDiscounted`,text:t.t(`REDUCE_PRICE_BY_DISCOUNTED`)},{value:`priceCampaign`,text:t.t(`REDUCE_PRICE_BY_CAMPAIGN`)}],s=[{value:`percent`,label:`%`,text:`${t.t(`REDUCE_TYPE_PERCENT`)} (%)`},{value:`price`,label:`$`,text:`${t.t(`REDUCE_TYPE_AMOUNT`)} ($)`}],c=[{value:`default`,disabled:!1,text:t.t(`FLASHSALE_SET_METHOD_DEFAULT`)},{value:`scheduler`,disabled:!1,text:t.t(`FLASHSALE_SET_METHOD_SCHEDULER`)}],l=[{value:`name`,text:t.t(`PRODUCT_SEARCH_BY.PRODUCT_NAME`)},{value:`id`,text:t.t(`PRODUCT_SEARCH_BY.PRODUCT_ID`)},{value:`variation`,text:t.t(`PRODUCT_SEARCH_BY.VARIATION_NAME`)},{value:`sku`,text:t.t(`PRODUCT_SEARCH_BY.PRODUCT_SKU`)},{value:`msku`,text:t.t(`PRODUCT_SEARCH_BY.VARIATION_SKU`)}],u=[{title:`#`,key:`index`,width:60},{title:t.t(`PRODUCT_ID`),key:`id`,width:150},{title:t.t(`PRODUCT_SKU`),key:`sku`,width:150},{title:t.t(`PRODUCT_TIME_CREATE`),key:`timeCreate`,sortable:!0,width:120},{title:t.t(`PRODUCT_NAME`),slot:`name`,sortable:!0,minWidth:300},{title:t.t(`PRODUCT_MODEL`),key:`modelCount`,width:100},{title:t.t(`PRODUCT_SOLD`),key:`soldCount`,sortable:!0,width:100},{title:t.t(`PRODUCT_STOCK`),key:`stock`,sortable:!0,width:100},{title:t.t(`PRODUCT_PRICE_ORIGINAL`),key:`priceOrginal`,sortable:!0,width:120},{title:t.t(`PRODUCT_PRICE_PROMOTION`),key:`pricePromotion`,sortable:!0,width:120},{title:t.t(`TABLE_COLUM_ACTION`),slot:`action`,width:150}],d=[{title:`#`,key:`index`,width:60},{title:t.t(`PRODUCT_NAME`),key:`name`,slot:`name`,sortable:!0,minWidth:250},{title:t.t(`PRODUCT_MODEL`),key:`modelName`,sortable:!0,minWidth:120},{title:t.t(`PRODUCT_STOCK`),key:`stock`,width:100},{title:t.t(`PRODUCT_PRICE_ORIGINAL`),slot:`priceOrginal`,width:110},{title:t.t(`PRODUCT_PRICE_PROMOTION`),slot:`priceDiscounted`,width:110},{title:t.t(`PRODUCT_PERCENT_FLASHSALE`),slot:`percentPromotion`,width:120},{title:t.t(`PRODUCT_PRICE_FLASHSALE`),slot:`pricePromotion`,width:150},{title:t.t(`PRODUCT_PROMOTION_STOCK_LIMIT`),slot:`stockLimit`,width:200},{title:t.t(`PRODUCT_PROMOTION_PURCHASE_LIMIT`),slot:`purchaseLimit`,width:200},{title:t.t(`PRODUCT_PROMOTION_STATUS`),slot:`status`,width:150}],f={[t.t(`FLASHSALE_ID`)]:`id`,[t.t(`FLASHSALE_STATUS`)]:`status`,[t.t(`FLASHSALE_TIME`)]:`time`,[t.t(`PRODUCT_NAME`)]:`product`,[t.t(`PRODUCT_MODEL`)]:`modelName`,[t.t(`PRODUCT_STOCK`)]:`stock`,[t.t(`PRODUCT_PROMOTION_CHANGE`)]:`percentPromotion`,[t.t(`PRODUCT_PRICE_ORIGINAL`)]:`priceOrginal`,[t.t(`PRODUCT_PRICE_PROMOTION`)]:`pricePromotion`,[t.t(`PRODUCT_PROMOTION_STOCK_LIMIT`)]:`stockLimit`,[t.t(`PRODUCT_PROMOTION_PURCHASE_LIMIT`)]:`purchaseLimit`,[t.t(`FLASHSALE_LINK`)]:`url`,[t.t(`FLASHSALE_LOG`)]:`log`},p={priceMin:1e3,percentMax:.1,percentMin:.8,stockDuration:1,limitProduct:10,defaultPromotion:{pricePromotion:0,purchaseLimit:0,stockLimit:0,status:!0},stockSplitDefault:3,getPriceMinPromotion(e){return e*i.number},getPriceMaxPromotion(e){return e*1}},m={0:t.t(`FLASHSALE_STATUS_BY.UNKNOW`),1:t.t(`FLASHSALE_STATUS_BY.NEXT`),2:t.t(`FLASHSALE_STATUS_BY.CURRENT`),3:t.t(`FLASHSALE_STATUS_BY.END`)},h=e=>Math.floor(e,0),g=e=>new Date(e*1e3),_=(e,t)=>[(0,r.default)(e).format(`DD/MM/YYYY`),(0,r.default)(e).format(`HH:mm:ss`),(0,r.default)(t).format(`HH:mm:ss`)].join(` - `);export{o as a,c,h as d,u as f,_ as i,a as l,g as m,f as n,s as o,d as p,i as r,l as s,p as t,m as u};