/*!
 * Crafted with ❤ by Salla
 */
import{r as e,c as t,h as d,H as c}from"./p-Cb4NFvMH.js";const r=class{constructor(d){e(this,d),this.orderEditProductSelected=t(this,"orderEditProductSelected")}get productData(){if(!this.product)return{};if("object"==typeof this.product)return this.product;try{return JSON.parse(this.product)}catch(e){return{}}}handleSelectProduct(){this.orderEditProductSelected.emit({product:this.productData})}render(){const e=this.productData,t=e?.name||salla.lang.getWithDefault("common.elements.product","منتج"),r=e?.price;return d(c,{key:"e5837d7ec53f2566fe981f02a95b52c7c817821c"},d("button",{key:"415861262349f83c3c7d1dc72d9f8f01f855317e",type:"button",class:"s-order-edit-product-card",onClick:()=>this.handleSelectProduct()},d("div",{key:"072d3af840d5044636380f5620703cc446877162",class:"s-order-edit-product-card-media"},e?.image?.url?d("img",{src:e.image.url,alt:e.image.alt||t,class:"s-order-edit-product-card-image"}):d("div",{class:"s-order-edit-product-card-placeholder"},d("i",{class:"sicon-shopping-bag"}))),d("div",{key:"ac51822bbcf1f2213b11204fa968a40e7de164a3",class:"s-order-edit-product-card-content"},d("h3",{key:"e817582bf88db2ed6ac47a37a5d2b4e4ac953770",class:"s-order-edit-product-card-title"},t),null!=r&&d("p",{key:"efbf1b16d7c6d73de76bab1e8715a474f812fde4",class:"s-order-edit-product-card-price",innerHTML:salla.money(r)}))))}};r.style=":host{display:block;min-width:0}";export{r as salla_order_edit_product_card}