"use strict";(self.webpackChunkreact_wordpress=self.webpackChunkreact_wordpress||[]).push([[464],{5618(e,t,a){a.r(t),a.d(t,{default:()=>m});var r=a(6540),n=a(296),c=a(7767),i=a(5235),o=a(3112),l=a(5666);const s=function(e){var t=e.Icon,a=e.CampaignType,s=e.Description,p=e.to,m=void 0===p?"":p,g=e.campaign_value,x=(0,c.Zp)(),d=r.useContext(o.Hi),u=r.useContext(o.ib),f=r.useState(!1),h=(0,n.A)(f,2),_=h[0],v=h[1];return r.useEffect(function(){(d||"point_for_purchase"===g)&&v(!0)},[d,g]),r.createElement("div",{className:"group relative flex hover:shadow-card hover:border-white  space-x-2 2xl:space-x-3  \n    transition duration-300 flex-col h-76 w-70 2xl:w-84 justify-around\n    items-center  space-y-3 ".concat(_?"bg-white":"bg-gray-100"," border broder-light_border rounded-lg  px-5 2xl:px-7 py-4 2xl:py-6  ")},r.createElement(function(e){var t=e.icon;return r.createElement("div",{className:"p-4 rounded-full bg-primary_extra_light"},r.createElement("div",{className:"h-9 w-9 font-normal text-primary flex items-center justify-center "},t))},{icon:t}),r.createElement("h4",{className:"font-bold text-dark text-sm 2xl:text-md antialiased"},a),r.createElement("p",{className:"text-xs  2xl:text-sm  text-light  text-center"},s),r.createElement(l.A,{textStyle:"text-primary text-sm_14_l_20",outline:!0,outlineStyle:"".concat(_?"border-primary":"  group-hover:border-active_green"),bgColor:"bg-white ",padding:"px-2 2xl:px-3  py-1.5 2xl:py-2 ",others:"".concat(_?"group-hover:bg-primary":"group-hover:bg-active_green group-hover:border-active_green","  group-hover:text-white transition duration-300"),click:function(e){e.preventDefault(),_?x(m):window.open(i.RP)}},_?u.earn_campaign.create:u.common.premium),!_&&r.createElement("div",{style:{right:"12px",height:"30px"},className:"flex gap-x-2  rounded-md border group-hover:border-active_green group-hover:bg-active_light_green   border-card_border  bg-white px-2 py-1.5 top-0  items-center justify-center absolute"},r.createElement("i",{className:"wlr wlrf-lock text-sm text-light font-semibold group-hover:text-active_green "}),r.createElement("span",{className:"text-xs 2xl:text-sm  font-semibold text-light group-hover:text-active_green  "},u.common.pro_text)))};var p=a(1852);const m=function(){var e=(0,c.Zp)(),t=r.useContext(o.DC).appState,a=r.useContext(o.ib);return t.loading?r.createElement("div",{className:"w-full h-120"},r.createElement(p.A,null)):r.createElement("div",{className:"bg-white w-full rounded-b-md  h-full flex flex-col items-start py-5 px-8 space-y-4"},r.createElement("h4",{className:"flex font-bold items-center text-dark text-sm gap-3 uppercase tracking-wide"},r.createElement("span",{className:""},r.createElement("i",{className:"wlr wlrf-back  text-lg font-bold text-dark cursor-pointer color-important",onClick:function(){e("/earn_campaign")}})),a.earn_campaign.add_new_campaign_button),r.createElement("p",{className:"text-light text-sm font-medium"},a.earn_campaign.add_new_campaign_description),r.createElement("div",{className:"flex items-center justify-center w-full mb-2 "},r.createElement("div",{className:"grid grid-cols-2 xl:grid-cols-3  gap-x-5 gap-y-6"},Object.keys(t.local.action_types).filter(function(e){return"purchase_histories"!==e}).map(function(e,t){var n,c=(n=e,{Icon:r.createElement("div",{className:"text-primary"},r.createElement("i",{className:"wlr wlrf-".concat(n," text-4xl color-important")})),CampaignType:a.earn_campaign.create_campaign[n].title,Description:a.earn_campaign.create_campaign[n].supporting_text,to:"/edit_earn_campaign/".concat(n,"/0")});return r.createElement(s,{key:t,Icon:c.Icon,CampaignType:c.CampaignType,Description:c.Description,to:c.to,campaign_value:e})}))))}}}]);