관리-도구
편집 파일: CollectionsEdit.1a5c97a32ce998b7.js
/*! For license information please see CollectionsEdit.1a5c97a32ce998b7.js.LICENSE.txt */ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9710],{4937:(t,e,r)=>{r.d(e,{A:()=>a});var n=r(76314),i=r.n(n)()((function(t){return t[1]}));i.push([t.id,".text-mono[data-v-424b22c3]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.card-soft[data-v-424b22c3]{border:1px solid #edf2f7;border-radius:12px}.finder[data-v-424b22c3]{background:#fbfbfd}.results-list[data-v-424b22c3]{max-height:420px;overflow:auto}.result-row[data-v-424b22c3]{align-items:center;border-bottom:1px dashed #e5e7eb;display:flex;gap:.75rem;justify-content:space-between;padding:.5rem 0}.result-row[data-v-424b22c3]:last-child{border-bottom:0}.result-row .thumb[data-v-424b22c3]{background:#f3f4f6;border:1px solid #eef2f7;border-radius:6px;height:40px;margin-right:.5rem;overflow:hidden;width:40px}.result-row .thumb img[data-v-424b22c3]{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.table .thumb[data-v-424b22c3]{background:#f3f4f6;border:1px solid #eef2f7;border-radius:6px;height:36px;overflow:hidden;width:36px}.table .thumb img[data-v-424b22c3]{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.empty-state[data-v-424b22c3]{background:#fafafa;border:2px dashed #e2e8f0;border-radius:1rem;padding:2rem;text-align:center}.empty-state .emoji[data-v-424b22c3]{font-size:1.8rem}.empty-state .title[data-v-424b22c3]{font-weight:700;margin-top:.25rem}.empty-state .subtitle[data-v-424b22c3]{color:#6b7280}.side[data-v-424b22c3]{top:88px}.btn-block[data-v-424b22c3]{width:100%}.fw-600[data-v-424b22c3]{font-weight:600}",""]);const a=i},90:(t,e,r)=>{r.r(e),r.d(e,{default:()=>f});var n=r(72505),i=r.n(n);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function o(){o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,r){return t[e]=r}}function v(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new T(n||[]);return i(o,"_invoke",{value:E(t,r,s)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=v;var f="suspendedStart",h="suspendedYield",m="executing",b="completed",_={};function g(){}function y(){}function w(){}var x={};d(x,c,(function(){return this}));var C=Object.getPrototypeOf,k=C&&C(C(O([])));k&&k!==r&&n.call(k,c)&&(x=k);var $=w.prototype=g.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(i,o,s,c){var l=p(t[i],t,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==a(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(d).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,r,n){var i=f;return function(a,o){if(i===m)throw Error("Generator is already running");if(i===b){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var c=j(s,n);if(c){if(c===_)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var l=p(e,r,n);if("normal"===l.type){if(i=n.done?b:h,l.arg===_)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=b,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var a=p(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,_;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,_):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,_)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function O(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(a(e)+" is not iterable")}return y.prototype=w,i($,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:y,configurable:!0}),y.displayName=d(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,d(t,u,"GeneratorFunction")),t.prototype=Object.create($),t},e.awrap=function(t){return{__await:t}},S(L.prototype),d(L.prototype,l,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var o=new L(v(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},S($),d($,u,"Generator"),d($,c,(function(){return this})),d($,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=O,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,_):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),_}},e}function s(t,e,r,n,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){s(a,n,i,o,c,"next",t)}function c(t){s(a,n,i,o,c,"throw",t)}o(void 0)}))}}const l={metaInfo:{title:"Store Collections Edit"},props:{id:{type:[String,Number],required:!1}},data:function(){return{isLoading:!0,saving:!1,searching:!1,productQuery:"",results:[],form:{title:"",slug:"",description:"",limit:8,sort_order:0},selected:[],t:null}},mounted:function(){this.fetch()},methods:{makeToast:function(t,e,r){this.$root&&this.$root.$bvToast&&this.$root.$bvToast.toast(e,{title:r,variant:t,solid:!0})},slugify:function(t){return String(t||"").toLowerCase().trim().replace(/['"]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")},autoSlugIfEmpty:function(){this.form.slug||(this.form.slug=this.slugify(this.form.title))},fetch:function(){var t=this;return c(o().mark((function e(){var r,n,a,s,c,l,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.prev=1,r=t.id||t.$route.params.id,e.next=5,i().get("/admin/store/collections/".concat(r));case 5:for(n=e.sent,(a=n&&n.data&&n.data.data?n.data.data:n?n.data:null)||(a={}),t.form={title:a.title||"",slug:a.slug||"",description:a.description||"",limit:null!=a.limit?a.limit:8,sort_order:null!=a.sort_order?a.sort_order:0},s=Array.isArray(a.products)?a.products.slice():[],c={},l=0;l<s.length;l++)(u=s[l])&&u.id&&u.pivot&&(c[u.id]={sort_order:null!=u.pivot.sort_order?u.pivot.sort_order:0,pinned:!!u.pivot.pinned});t.selected=s.map((function(t){return{product_id:t.id,name:t.name||t.title||"#"+t.id,sku:t.sku||t.code||"",pinned:!(!t.pivot||!t.pivot.pinned)}})).sort((function(t,e){return(c[t.product_id]?c[t.product_id].sort_order:0)-(c[e.product_id]?c[e.product_id].sort_order:0)})),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),t.makeToast("danger",t.$t("Failed_to_load"),t.$t("Failed"));case 18:return e.prev=18,t.isLoading=!1,e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[1,15,18,21]])})))()},debouncedSearch:function(){var t=this;this.t&&clearTimeout(this.t),this.t=setTimeout((function(){t.searchProducts()}),300)},searchProducts:function(){var t=this;return c(o().mark((function e(){var r,n,a,s,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(t.productQuery||"").trim()){e.next=4;break}return t.results=[],e.abrupt("return");case 4:return t.searching=!0,e.prev=5,s=null,e.prev=7,e.next=10,i().get("/admin/store/products",{params:{q:r,limit:20}});case 10:s=e.sent,e.next=15;break;case 13:e.prev=13,e.t0=e.catch(7);case 15:c=Array.isArray(null===(n=s)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.data)?s.data.data:Array.isArray(null===(a=s)||void 0===a?void 0:a.data)?s.data:[],t.results=Array.isArray(c)?c:[],e.next=22;break;case 19:e.prev=19,e.t1=e.catch(5),t.makeToast("danger",t.$t("Failed_to_load"),t.$t("Failed"));case 22:return e.prev=22,t.searching=!1,e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[5,19,22,25],[7,13]])})))()},hasProduct:function(t){return this.selected.some((function(e){return e.product_id===t}))},addProduct:function(t){t&&!this.hasProduct(t.id)&&this.selected.push({product_id:t.id,name:t.name?t.name:t.title?t.title:"#"+t.id,sku:t.sku||t.code||"",pinned:!1})},remove:function(t){this.selected.splice(t,1)},move:function(t,e){var r=t+e;if(!(r<0||r>=this.selected.length)){var n=this.selected.splice(t,1)[0];this.selected.splice(r,0,n)}},clearSelected:function(){this.selected.length&&confirm(this.$t("Confirm_Clear_All"))&&(this.selected=[])},itemsPayload:function(){return this.selected.map((function(t,e){return{product_id:t.product_id,sort_order:10*(e+1),pinned:!!t.pinned}}))},update:function(){var t=this;return c(o().mark((function e(){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.form.title&&t.form.slug){e.next=3;break}return t.makeToast("danger",t.$t("Title_and_Slug_required"),t.$t("Invalid")),e.abrupt("return");case 3:return t.saving=!0,e.prev=4,r=t.id||t.$route.params.id,e.next=8,i().put("/admin/store/collections/".concat(r),t.form);case 8:if(!t.selected.length){e.next=17;break}return e.prev=9,e.next=12,i().post("/admin/store/collections/".concat(r,"/products"),{items:t.itemsPayload()});case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(9),t.makeToast("warning",t.$t("Collection_saved_but_products_not_synced"),t.$t("Warning"));case 17:t.makeToast("success",t.$t("Successfully_Updated"),t.$t("Success")),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(4),t.makeToast("danger",t.$t("InvalidData"),t.$t("Failed"));case 23:return e.prev=23,t.saving=!1,e.finish(23);case 26:case"end":return e.stop()}}),e,null,[[4,20,23,26],[9,14]])})))()},updateAndClose:function(){var t=this;return c(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.update();case 2:t.$router.push({name:"StoreCollections"});case 3:case"end":return e.stop()}}),e)})))()}}};var u=r(85072),d=r.n(u),v=r(4937),p={insert:"head",singleton:!1};d()(v.A,p);v.A.locals;const f=(0,r(14486).A)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-content"},[e("breadcumb",{attrs:{page:t.$t("Edit_Collection"),folder:t.$t("Store")}}),t._v(" "),t.isLoading?e("div",{staticClass:"loading_page spinner spinner-primary mr-3"}):e("b-card",{staticClass:"px-0"},[e("b-form",{on:{submit:function(e){return e.preventDefault(),t.update.apply(null,arguments)}}},[e("div",{staticClass:"row no-gutters"},[e("div",{staticClass:"col-lg-8 p-3 p-lg-4"},[e("div",{staticClass:"card card-soft shadow-sm mb-4"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex align-items-center justify-content-between flex-wrap mb-2"},[e("h5",{staticClass:"mb-0"},[t._v(t._s(t.$t("Collection_Details")))])]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-8"},[e("b-form-group",{attrs:{label:t.$t("Title")}},[e("b-form-input",{attrs:{required:""},on:{input:t.autoSlugIfEmpty},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title","string"==typeof e?e.trim():e)},expression:"form.title"}})],1)],1)]),t._v(" "),e("b-form-group",{attrs:{label:t.$t("Slug")}},[e("b-input-group",[e("b-input-group-prepend",{attrs:{"is-text":""}},[t._v("/collections/")]),t._v(" "),e("b-form-input",{attrs:{required:""},model:{value:t.form.slug,callback:function(e){t.$set(t.form,"slug","string"==typeof e?e.trim():e)},expression:"form.slug"}})],1)],1),t._v(" "),e("b-form-group",{attrs:{label:t.$t("Description")}},[e("b-form-textarea",{attrs:{rows:"3"},model:{value:t.form.description,callback:function(e){t.$set(t.form,"description","string"==typeof e?e.trim():e)},expression:"form.description"}})],1),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-4"},[e("b-form-group",{attrs:{label:t.$t("Limit")}},[e("b-form-input",{attrs:{type:"number",min:"1"},model:{value:t.form.limit,callback:function(e){t.$set(t.form,"limit",t._n(e))},expression:"form.limit"}})],1)],1)])],1)])]),t._v(" "),e("div",{staticClass:"col-lg-4 p-3 p-lg-4"},[e("div",{staticClass:"side sticky-top"},[e("div",{staticClass:"card shadow-sm"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-grid gap-2"},[e("b-button",{attrs:{disabled:t.saving,type:"submit",variant:"btn btn-primary btn-block"}},[t.saving?e("span",{staticClass:"spinner-border spinner-border-sm mr-2"}):t._e(),t._v(" "),e("i",{staticClass:"i-Yes"}),t._v(" "+t._s(t.$t("Save"))+"\n ")]),t._v(" "),e("b-button",{attrs:{disabled:t.saving,variant:"btn btn-outline-secondary btn-block"},on:{click:t.updateAndClose}},[e("i",{staticClass:"i-Yes"}),t._v(" "+t._s(t.$t("Save_and_Close"))+"\n ")]),t._v(" "),e("router-link",{staticClass:"btn btn-outline-dark btn-block",attrs:{to:{name:"StoreCollections"}}},[t._v("\n "+t._s(t.$t("Cancel"))+"\n ")])],1)])]),t._v(" "),e("div",{staticClass:"helper mt-3"},[e("div",{staticClass:"small text-muted"},[t._v("\n 💡 "+t._s(t.$t("Tip_reorder_products_for_priority"))+"\n ")])])])])]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 p-3 p-lg-4"},[e("div",{staticClass:"card card-soft shadow-sm"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex align-items-center justify-content-between flex-wrap"},[e("h5",{staticClass:"mb-2"},[t._v(t._s(t.$t("Products_in_Collection")))]),t._v(" "),e("div",{staticClass:"small text-muted"},[t._v("\n "+t._s(t.selected.length)+" "+t._s(t.$t("selected"))+"\n "),t.form.limit?e("span",[t._v(" • "+t._s(t.$t("Display_limit"))+": "+t._s(t.form.limit))]):t._e()])]),t._v(" "),e("div",{staticClass:"row mt-2"},[e("div",{staticClass:"col-lg-6"},[e("div",{staticClass:"finder border rounded p-3"},[e("div",{staticClass:"d-flex align-items-center justify-content-between"},[e("b-input-group",[e("b-form-input",{attrs:{placeholder:t.$t("Search_products")+"…"},on:{input:t.debouncedSearch},model:{value:t.productQuery,callback:function(e){t.productQuery="string"==typeof e?e.trim():e},expression:"productQuery"}}),t._v(" "),e("b-input-group-append",[e("b-button",{attrs:{disabled:t.searching,variant:"outline-secondary"},on:{click:t.searchProducts}},[t.searching?e("span",{staticClass:"spinner-border spinner-border-sm mr-1"}):e("i",{staticClass:"i-Search-People"})])],1)],1)],1),t._v(" "),t.searching||!t.productQuery||t.results.length?t._e():e("div",{staticClass:"small text-muted mt-1"},[t._v("\n "+t._s(t.$t("No_results"))+"\n ")]),t._v(" "),e("div",{staticClass:"results-list mt-3"},[t._l(t.results,(function(r){return e("div",{key:"r-"+r.id,staticClass:"result-row"},[e("div",{staticClass:"d-flex align-items-center"},[e("div",{staticClass:"text-truncate"},[e("div",{staticClass:"fw-600"},[t._v("\n "+t._s(r.name?r.name:r.title?r.title:"#"+r.id)+"\n ")]),t._v(" "),e("div",{staticClass:"small text-muted"},[t._v("\n #"+t._s(r.id)+"\n "),r.code||r.sku?e("span",[t._v("• "+t._s(r.code||r.sku))]):t._e(),t._v(" "),Array.isArray(r.variants)&&r.variants.length?e("span",[t._v("• "+t._s(r.variants.length)+" "+t._s(t.$t("variants")))]):t._e()])])]),t._v(" "),e("div",[e("b-button",{attrs:{size:"sm",variant:"outline-primary",disabled:t.hasProduct(r.id)},on:{click:function(e){return t.addProduct(r)}}},[t._v("\n "+t._s(t.hasProduct(r.id)?t.$t("Added"):t.$t("Add"))+"\n ")])],1)])})),t._v(" "),t.productQuery||t.results.length||t.searching?t._e():e("div",{staticClass:"empty-state mt-3"},[e("div",{staticClass:"emoji"},[t._v("🔎")]),t._v(" "),e("div",{staticClass:"title"},[t._v(t._s(t.$t("Start_typing_to_search")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$t("Search_by_name_SKU_or_ID")))])])],2)])]),t._v(" "),e("div",{staticClass:"col-lg-6 mt-3 mt-lg-0"},[e("div",{staticClass:"border rounded p-3"},[t.selected.length?e("div",{staticClass:"table-responsive"},[e("table",{staticClass:"table table-sm align-middle"},[e("thead",[e("tr",[e("th",{staticStyle:{width:"60px"}},[t._v("#")]),t._v(" "),e("th",[t._v(t._s(t.$t("Product")))]),t._v(" "),e("th",{staticClass:"text-right",staticStyle:{width:"220px"}},[t._v(t._s(t.$t("Actions")))])])]),t._v(" "),e("tbody",t._l(t.selected,(function(r,n){return e("tr",{key:"s-"+r.product_id},[e("td",[e("code",{staticClass:"small"},[t._v(t._s(n+1))])]),t._v(" "),e("td",[e("div",{staticClass:"d-flex align-items-center"},[r.thumb?e("div",{staticClass:"thumb mr-2"},[e("img",{attrs:{src:r.thumb,alt:"thumb"}})]):t._e(),t._v(" "),e("div",[e("div",{staticClass:"fw-600"},[t._v(t._s(r.name))]),t._v(" "),e("small",{staticClass:"text-muted"},[t._v("#"+t._s(r.product_id)+" "),r.sku?e("span",[t._v("• "+t._s(r.sku))]):t._e()])])])]),t._v(" "),e("td",{staticClass:"text-right"},[e("div",{staticClass:"btn-group btn-group-sm"},[e("b-button",{attrs:{variant:"outline-secondary",disabled:0===n},on:{click:function(e){return t.move(n,-1)}}},[t._v("↑")]),t._v(" "),e("b-button",{attrs:{variant:"outline-secondary",disabled:n===t.selected.length-1},on:{click:function(e){return t.move(n,1)}}},[t._v("↓")]),t._v(" "),e("b-button",{attrs:{variant:"outline-danger"},on:{click:function(e){return t.remove(n)}}},[t._v(t._s(t.$t("Remove")))])],1)])])})),0)]),t._v(" "),e("div",{staticClass:"d-flex align-items-center justify-content-between mt-2"},[e("div",{staticClass:"small text-muted"},[t._v("\n "+t._s(t.$t("Order_determines_display_priority"))+"\n ")]),t._v(" "),e("div",[e("b-button",{attrs:{size:"sm",variant:"outline-danger",disabled:!t.selected.length},on:{click:t.clearSelected}},[t._v("\n "+t._s(t.$t("Clear_all"))+"\n ")])],1)])]):e("div",{staticClass:"empty-state"},[e("div",{staticClass:"emoji"},[t._v("🧺")]),t._v(" "),e("div",{staticClass:"title"},[t._v(t._s(t.$t("No_products_in_collection_yet")))]),t._v(" "),e("div",{staticClass:"subtitle"},[t._v(t._s(t.$t("Use_search_to_add_products")))])])])])])])])])])])],1)],1)}),[],!1,null,"424b22c3",null).exports}}]);