(()=>{"use strict";const e=window.wp.blocks,s=JSON.parse('{"apiVersion":3,"name":"jobus/testimonials-item","parent":["jobus/group-testimonials"],"version":"1.0.0","title":"Testimonial Item (Jobus)","description":"Jobus Testimonials. A block that allows you to add a client review to your page.","icon":"dashicons dashicons-testimonial","category":"jobus-blocks","supports":{"html":false,"anchor":true},"attributes":{"authorImage":{"type":"string","default":""},"authorName":{"type":"string","default":"Arif Rahman"},"location":{"type":"string","default":"Bangladesh"},"reviewContents":{"type":"string","default":""},"rating":{"type":"number","default":"5"}},"textdomain":"jobus","keywords":["jobus","Testimonials Item","Review Item"],"editorScript":"file:./index.js","editorStyle":"file:./editor.css","style":"file:./style-index.css"}'),t=window.wp.blockEditor,a=window.wp.element,i=window.wp.components,l=window.wp.i18n,o=window.ReactJSXRuntime;(0,e.registerBlockType)(s,{edit:function({attributes:e,setAttributes:s}){const n=(0,t.useBlockProps)({className:"item"}),{rating:r}=e;return(0,o.jsx)(a.Fragment,{children:(0,o.jsxs)("div",{...n,children:[(0,o.jsx)(t.MediaUploadCheck,{children:(0,o.jsx)(t.MediaUpload,{onSelect:e=>s({authorImage:e.url}),type:"image",render:({open:s})=>(0,o.jsxs)("div",{children:[(0,o.jsx)("button",{onClick:s,children:"Select Author Image"}),e.authorImage&&(0,o.jsx)("img",{src:e.authorImage,alt:"Author"})]})})}),(0,o.jsx)(i.TextControl,{label:(0,l.__)("Author Name","jobus"),value:e.authorName,onChange:e=>s({authorName:e})}),(0,o.jsx)(i.TextControl,{label:(0,l.__)("Location","jobus"),value:e.location,onChange:e=>s({location:e})}),(0,o.jsx)(i.TextareaControl,{label:(0,l.__)("Review Contents","jobus"),value:e.reviewContents,onChange:e=>s({reviewContents:e})}),(0,o.jsx)(i.SelectControl,{label:(0,l.__)("Rating","jobus"),value:e.rating,options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5}],onChange:e=>s({rating:e})})]})})},save:function({attributes:e}){const s=t.useBlockProps.save({className:"item"}),{authorName:a,location:i,reviewContents:n,rating:r,authorImage:c}=e;return(0,o.jsx)("div",{...s,children:(0,o.jsxs)("div",{className:"feedback-block-four ddddd",children:[(0,o.jsxs)("div",{className:"jbs-d-flex jbs-align-items-center",children:[(0,o.jsx)("ul",{className:"jbs-style-none jbs-d-flex rating",children:Array.from({length:r},((e,s)=>(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:"#",tabIndex:"0",children:(0,o.jsx)("i",{className:"bi bi-star-fill"})})},s)))}),(0,o.jsxs)("div",{className:"review-score",children:[(0,o.jsx)("span",{className:"jbsfw-500 jbs-text-dark",children:r})," ",(0,l.__)("out of 5","jobus")]})]}),(0,o.jsx)("blockquote",{children:n}),(0,o.jsxs)("div",{className:"jbs-d-flex jbs-align-items-center",children:[c&&(0,o.jsx)("img",{src:c,alt:"Author",className:"author-img jbs-rounded-circle"}),(0,o.jsxs)("div",{className:"jbs-ms-3",children:[(0,o.jsx)("div",{className:"name jbs-fw-500 jbs-text-dark",children:a}),(0,o.jsx)("span",{className:"jbs-opacity-50",children:i})]})]})]})})}})})();
//# sourceMappingURL=index.js.map