import{_}from"./AdminLayout.vue_vue_type_script_setup_true_lang-CE8oEe4m.js";import{d as p,c as i,o,a as d,b as s,u as n,m as h,h as b,j as m,f as r,t as a,P as c,F as u,p as f,A as g,x as y,T as v}from"./app-DJb_CRLj.js";import{_ as w}from"./Pagination.vue_vue_type_script_setup_true_lang-9skHAHfw.js";import{_ as k}from"./SearchList.vue_vue_type_script_setup_true_lang-CyAiOusi.js";import{_ as $}from"./Files.vue_vue_type_script_setup_true_lang-CRYWsXWh.js";import"./simplebar.min-CZ5saGqI.js";import"./debounce-CDPmhVE8.js";import"./useToastify-DqLaHt3f.js";import"./coloris-DdyWondq.js";/* empty css                             *//* empty css              */import"./useCopyToClipboard-CrZ6pkmz.js";import"./useRandomNum-BTw6623a.js";import"./FilterList.vue_vue_type_script_setup_true_lang-CCLhEmVl.js";const C={class:"container-fluid"},B={class:"user-list list mb-4"},N={class:"card"},V={class:"card-body"},j={class:"action-container mb-4 d-flex align-items-center justify-content-end"},T={class:"table-responsive mb-4"},F={class:"table",style:{"min-width":"900px"}},L={key:0,class:"color-box add-image",style:{width:"30px",height:"30px"}},P=["src"],S={class:"dropdown"},q={class:"dropdown-menu shadow-smooth-2"},z=["data-bs-target"],A=["id"],D={class:"modal-dialog modal-dialog-centered"},E={class:"modal-content"},G={style:{direction:"rtl"}},H={class:"modal-header"},I={class:"modal-title lts-05 fs-5"},J={class:"modal-footer"},K={key:0,class:"product-list-empty"},M={class:"lts-05"},is=p({layout:_,__name:"List",props:{colors:{},keyword:{}},setup(O){return(e,t)=>(o(),i(u,null,[d(n(h),{title:e.$t("messages.title.colors")},null,8,["title"]),s("div",C,[d($,{title:e.$t("messages.word.colors")},null,8,["title"]),s("div",B,[s("div",N,[s("div",V,[s("div",j,[d(n(c),{href:e.route("admin.product.colors.create"),class:"btn btn-primary"},{default:m(()=>[r(a(e.$t("messages.sentence.create_new_color"))+" ",1),t[0]||(t[0]=s("i",{class:"ri-add-line"},null,-1))]),_:1},8,["href"])]),d(k,{keyword:e.keyword,placeholder:e.$t("messages.sentence.color_name")+" ..."},null,8,["keyword","placeholder"]),s("div",T,[s("table",F,[t[4]||(t[4]=s("thead",null,[s("tr",null,[s("th",{class:"first-small"},[s("i",{class:"ri-palette-line"})]),s("th",null,"نام"),s("th",null,"کد"),s("th",{class:"first-small"},[s("i",{class:"ri-settings-4-line"})])])],-1)),s("tbody",null,[(o(!0),i(u,null,f(e.colors.data,l=>(o(),i("tr",{key:l.id},[s("td",null,[l.image!=null?(o(),i("div",L,[s("img",{src:l.image,alt:"رنگ"},null,8,P)])):(o(),i("span",{key:1,class:"btn btn-square btn-xs shadow-1",style:g([{cursor:"default"},{"background-color":l.color}])},null,4))]),s("td",null,a(l.label),1),s("td",null,a(l.color),1),s("td",S,[t[3]||(t[3]=s("i",{class:"ri-more-2-fill","data-bs-toggle":"dropdown"},null,-1)),s("div",q,[s("ul",null,[s("li",null,[s("a",{class:"dropdown-item lts-05",href:"javascript:void(0)","data-bs-toggle":"modal","data-bs-target":"#remove-color-"+l.id},[t[1]||(t[1]=s("i",{class:"ri-delete-bin-line"},null,-1)),r(" "+a(e.$t("messages.word.delete")),1)],8,z)])])]),(o(),y(v,{to:"body"},[s("div",{class:"modal fade",id:"remove-color-"+l.id,tabindex:"-1","aria-hidden":"true"},[s("div",D,[s("div",E,[s("form",G,[s("div",H,[s("div",I,a(e.$t("messages.sentence.are_you_sure_delete_color")),1),t[2]||(t[2]=s("button",{type:"button",class:"btn modal-close","data-bs-dismiss":"modal","aria-label":"Close"},[s("i",{class:"ri-close-line"})],-1))]),s("div",J,[d(n(c),{as:"button",href:e.route("admin.product.colors.destroy",l.id),method:"delete",class:"btn btn-sm btn-danger px-3","data-bs-dismiss":"modal","aria-label":"Close"},{default:m(()=>[r(a(e.$t("messages.word.delete")),1)]),_:2},1032,["href"])])])])])],8,A)]))])]))),128))])])]),e.colors.data.length==0?(o(),i("div",K,[s("div",M,a(e.$t("messages.sentence.no_items_found")),1)])):b("",!0),d(w,{links:e.colors.links},null,8,["links"])])])])])],64))}});export{is as default};
