| 1 |
import{j as e}from"./chunks/jsx-runtime.js?ver=1.6.4";import{c as p}from"./chunks/Icons.js?ver=1.6.4";import{b as s}from"./chunks/BlockEditorTranslator.js?ver=1.6.4";const{RichText:g}=wp.blockEditor,N=({title:a,value:l,onChange:o,children:t})=>e.jsxs("div",{className:"fct-customer-dashboard-item",children:[e.jsxs("div",{className:"fct-customer-dashboard-header",children:[e.jsx(g,{tagName:"h2",className:"fct-customer-dashboard-title",value:l,onChange:o,placeholder:s("Enter %s Title",a)}),e.jsx("div",{className:"actions",children:e.jsx("a",{href:"#",className:"is-link",children:s("View All")})})]}),e.jsx("div",{className:"fct-customer-dashboard-table",children:t})]}),w=()=>e.jsxs("table",{children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"10%"}}),e.jsx("col",{style:{width:"50%"}}),e.jsx("col",{style:{width:"20%"}}),e.jsx("col",{style:{width:"10%"}})]}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:"invoice-id",children:"#INV-6"}),e.jsx("span",{className:"text",children:"Aug 13"})]}),e.jsx("td",{children:e.jsx("div",{className:"product-info",children:e.jsxs("div",{className:"title",children:[s("Fluent Forms Pro Add-On: The Fastest & Most Powerful WordPress Form Plugin"),e.jsxs("span",{children:[" – ",s("Single Site Lifetime License")]})]})})}),e.jsx("td",{children:e.jsx("span",{className:"badge success",children:s("Completed")})}),e.jsx("td",{children:"$49.00"})]}),e.jsxs("tr",{children:[e.jsxs("td",{children:[e.jsx("span",{className:"text-system-dark text-sm block",children:"#INV-7"}),e.jsx("span",{className:"text",children:"Aug 14"})]}),e.jsx("td",{children:e.jsx("div",{className:"product-info",children:e.jsxs("div",{className:"title",children:[s("Fluent Forms Pro Add-On: The Fastest & Most Powerful WordPress Form Plugin"),e.jsxs("span",{children:[" – ",s("Single Site Lifetime License")]})]})})}),e.jsx("td",{children:e.jsx("span",{className:"badge warning",children:s("Processing")})}),e.jsx("td",{children:"$149.00"})]})]})]}),P={generalColors:{"--fluent-cart-customer-dashboard-primary-color":{value:"",label:s("Primary Color")},"--fluent-cart-customer-dashboard-title-color":{value:"",label:s("Title Color")},"--fluent-cart-customer-dashboard-sub-title-color":{value:"",label:s("Subtitle Color")},"--fluent-cart-customer-dashboard-text-color":{value:"",label:s("Text Color")},"--fluent-cart-customer-dashboard-border-color":{value:"",label:s("Border Color")},"--fluent-cart-customer-dashboard-divider-color":{value:"",label:s("Divider Color")}},navColors:{"--fluent-cart-customer-dashboard-nav-text-color":{value:"",label:s("Text Color")},"--fluent-cart-customer-dashboard-nav-active-bg-color":{value:"",label:s("Bg Color")},"--fluent-cart-customer-dashboard-nav-active-text-color":{value:"",label:s("Active Text Color")},"--fluent-cart-customer-dashboard-nav-active-bar-color":{value:"",label:s("Active Bar Color")}}},y=""+new URL("assets/CustomerProfile.png",import.meta.url).href,{useBlockProps:C}=wp.blockEditor,{registerBlockType:H}=wp.blocks,n=window.fluent_cart_customer_profile_data;H(n.slug+"/"+n.name,{apiVersion:3,title:n.title,category:"fluent-cart",example:{attributes:{},innerBlocks:[{name:"core/image",attributes:{url:y,alt:"Customer Profile Preview",style:{width:"100%",height:"auto"}}}]},icon:{src:p},attributes:{sectionTitles:{type:"object",default:{purchaseHistory:s("Purchase History"),subscriptions:s("Subscription Plans"),licenses:s("Licenses"),downloads:s("Downloads")}},colors:{type:"object",default:P}},edit:({attributes:a,setAttributes:l})=>{const o=C(),{sectionTitles:t,colors:u}=a,i={};Object.entries(u).forEach(([r,c])=>{Object.entries(c).forEach(([d,{value:m,type:x}])=>{if(x==="box"){const{top:f="0",right:j="0",bottom:b="0",left:v="0"}=m;i[d]=`${f} ${j} ${b} ${v}`}else i[d]=m})});const h=(r,c)=>{console.log(c),l({sectionTitles:{...t,[r]:c}})};return e.jsx(e.Fragment,{children:e.jsx("div",{...o,children:e.jsx("div",{className:"fct-customer-profile-block-editor",style:i,children:e.jsxs("div",{className:"fct-customer-dashboard-app-container fluent-cart-customer-profile-app",children:[e.jsxs("div",{className:"fct-customer-dashboard-navs-wrap",children:[e.jsxs("div",{className:"fct-customer-dashboard-customer-info",children:[e.jsx("img",{decoding:"async",src:"https://placehold.co/400",alt:"Kamran Hussen"}),e.jsxs("div",{className:"fct-customer-dashboard-customer-info-content",children:[e.jsx("h3",{children:s("Alex Smith")}),e.jsx("p",{children:"alexsmith@gmail.com"})]}),e.jsx("div",{id:"fct-customer-logout-button",children:e.jsx("a",{href:"#",title:s("Logout"),className:"fct-customer-logout-btn",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M5 22C4.44772 22 4 21.5523 4 21V3C4 2.44772 4.44772 2 5 2H19C19.5523 2 20 2.44772 20 3V6H18V4H6V20H18V18H20V21C20 21.5523 19.5523 22 19 22H5ZM18 16V13H11V11H18V8L23 12L18 16Z"})})})})]}),e.jsx("div",{id:"menu-container",children:e.jsx("div",{id:"fct-customer-menu-holder",children:e.jsx("div",{className:"fct-customer-navs-wrap",children:e.jsxs("ul",{className:"fct-customer-navs",children:[e.jsx("li",{className:"fct-customer-nav-item fct-customer-nav-item-dashboard active_customer_menu",children:e.jsxs("a",{className:"fct-customer-nav-link fct_route","aria-label":s("Dashboard"),href:"#",children:[s("Dashboard")," "]})}),e.jsx("li",{className:"fct-customer-nav-item fct-customer-nav-item-purchase-history",children:e.jsxs("a",{className:"fct-customer-nav-link fct_route","aria-label":s("Purchase History"),href:"#",children:[s("Purchase History")," "]})}),e.jsx("li",{className:"fct-customer-nav-item fct-customer-nav-item-subscriptions",children:e.jsxs("a",{className:"fct-customer-nav-link fct_route","aria-label":s("Subscription Plans"),href:"#",children:[s("Subscription Plans")," "]})}),e.jsx("li",{className:"fct-customer-nav-item fct-customer-nav-item-licenses",children:e.jsxs("a",{className:"fct-customer-nav-link fct_route","aria-label":s("Licenses"),href:"#",children:[s("Licenses")," "]})}),e.jsx("li",{className:"fct-customer-nav-item fct-customer-nav-item-downloads",children:e.jsxs("a",{className:"fct-customer-nav-link fct_route","aria-label":s("Downloads"),href:"#",children:[s("Downloads")," "]})}),e.jsx("li",{className:"fct-customer-nav-item fct-customer-nav-item-profile",children:e.jsxs("a",{className:"fct-customer-nav-link fct_route","aria-label":s("Profile"),href:"#",children:[s("Profile")," "]})})]})})})}),e.jsx("div",{id:"fct-customer-menu-toggle",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M3 4H21V6H3V4ZM3 11H21V13H3V11ZM3 18H21V20H3V18Z"})})})]}),e.jsx("div",{className:"fct-customer-dashboard-main-content",children:e.jsx(N,{title:s("Purchase History"),value:t.purchaseHistory,onChange:r=>h("purchaseHistory",r),children:e.jsx(w,{})})})]})})})})},save:()=>null}); |