PageSourceSearch

https://wazoplus.com/_next/static/chunks/common-423a9668-91879c89ba826360.js

js wazoplus.com collected 2026-10-04 01:41:10 UTC 44,315 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7244],{27453:(e,t,s)=>{s.r(t),s.d(t,{Heading:()=>a});var r=s(37876);let a=({children:e,className:t,withBorder:s,withTopMargin:a=!0})=>{let l=s?`border-0 border-b-heading-border leading-[50px] mb-5 ${a?"mt-[100px]":"mt-5"}`:"",o=`text-heading font-poppins font-[600] text-[18px] md:text-[24px] capitalize ${t??""} ${l}`;return(0,r.jsx)("h1",{className:o,children:e})}},49548:(e,t,s)=>{s.d(t,{A:()=>y});var r=s(37876),a=s(14232),l=s(21648),o=s(87569),i=s(51178),n=s(78205),d=s(88992),c=s(71090),m=s(28255),u=s(10841),x=s.n(u),h=s(64177),g=s(37411),p=s(89099),b=s(90890),f=s(13734),v=s(43169);function y({setIsModalOpen:e,isVisible:t,qualifications:s,enableEditMode:o=!0,selectedItem:i=null}){let[n,d]=(0,a.useState)(!0),[c,m]=(0,a.useState)(i);return(0,a.useEffect)(()=>{m(i)},[i]),(0,r.jsx)(l.A,{visible:t,onClose:()=>{d(!1),m(null),e(!1)},dialogClasses:"max-h-[90vh] md:w-[560px] h-fit z-[5000] rounded-b-none sm:rounded-md",hideCloseIcon:!1,isBottomModal:!0,isMobile:!0,title:"Education",children:(0,r.jsx)(j,{onFormCancel:()=>{d(!1),m(null),e(!1)},selected:c})})}function j({onFormCancel:e,selected:t}){let{register:s,handleSubmit:l,formState:{errors:u,touchedFields:y,isSubmitting:N},reset:C,setValue:w}=(0,d.mN)({resolver:(0,c.t)(m.MQ),defaultValues:{id:void 0,school:"",subject:"",degree:"",location:"",startDate:"",endDate:"",description:""}}),k=(0,p.useRouter)(),S=k?.query?.username??"",[A,E]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t?(C({id:t?.id??void 0,school:t?.school??"",subject:t?.subject??"",degree:t?.degree??"",location:t?.location??"",startDate:t?.startDate?x()(t.startDate).format("YYYY-MM-DD"):"",endDate:t?.endDate?x()(t.endDate).format("YYYY-MM-DD"):"",description:t?.description??""}),E(!t?.endDate)):(C({id:void 0,school:"",subject:"",degree:"",location:"",startDate:"",endDate:"",description:""}),E(!1))},[t,C]);let[B]=(0,h.n)(g.oJ,{refetchQueries:[{query:b.Kf,variables:{username:S}}],onCompleted(){f.oR.success("Education record saved"),e()}}),F=async e=>{e={...e,type:v.e.EDUCATION,startDate:x()(e.startDate).format("Y-MM-DD"),endDate:e?.endDate?x()(e.endDate).format("Y-MM-DD"):void 0,isCurrent:A},A&&(e.endDate=void 0),B({variables:e})};return(0,r.jsx)("div",{children:(0,r.jsxs)("form",{onSubmit:l(F),children:[(0,r.jsx)(i.cl,{label:"School",labelFor:"school",touched:y.school,error:u.school,className:"mt-5",children:(0,r.jsx)(i.ks,{type:"text",placeholder:"School",...s("school")})}),(0,r.jsx)(i.cl,{label:"Field of study",labelFor:"subject",touched:y.subject,error:u.subject,className:"mt-5",children:(0,r.jsx)(i.ks,{type:"text",placeholder:"Field of study (Eg: Accounting)",...s("subject")})}),(0,r.jsx)(i.cl,{label:"Degree",labelFor:"degree",touched:y.degree,error:u.degree,className:"mt-5",children:(0,r.jsx)(i.ks,{type:"text",placeholder:"Degree (Eg: Bachelor's Degree)",...s("degree")})}),(0,r.jsx)(i.cl,{label:"Location",labelFor:"location",touched:y.location,error:u.location,className:"mt-5",children:(0,r.jsx)(i.ks,{type:"text",placeholder:"Location",...s("location")})}),(0,r.jsxs)("div",{className:"flex space-x-2",children:[(0,r.jsx)(i.cl,{label:"Start date",labelFor:"startDate",touched:y.startDate,error:u.startDate,className:"mt-5",children:(0,r.jsx)(n.l,{placeholder:"mm/dd/yyyy",...s("startDate")})}),!A&&(0,r.jsx)(i.cl,{label:"End date",labelFor:"endDate",touched:y.endDate,error:u.endDate,className:"mt-5",children:(0,r.jsx)(n.l,{placeholder:"mm/dd/yyyy",...s("endDate")})})]}),(0,r.jsxs)("div",{className:"text-sm mt-2 pb-2",children:[(0,r.jsx)("input",{type:"checkbox",onChange:e=>E(e.target.checked)})," I am currently Studying in this school"]}),(0,r.jsx)(i.cl,{label:"Description",labelFor:"description",touched:y.description,error:u.description,className:"mt-5",children:(0,r.jsx)("textarea",{className:"mt-2 block w-full px-3 py-2 border border-gray-300 rounded text-sm focus:outline-none focus:ring-0 disabled:bg-gray-50 disabled:text-gray-500 disabled:border-gray-200 disabled:shadow-none invalid:border-pink-500 invalid:text-pink-600 focus:invalid:border-pink-500 focus:invalid:ring-pink-500 placeholder:gray-400 dark:bg-transparent",rows:6,...s("description")})}),(0,r.jsxs)("div",{className:"mt-2 flex items-center space-x-2 text-xs",children:[(0,r.jsx)(o.RoundedButton,{text:"Cancel",variant:"default",onClick:()=>e()}),(0,r.jsx)(o.RoundedButton,{text:"Submit",type:"submit"})]})]})})}},50754:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(37876),a=s(14232),l=s(21648);let o="text-sm font-semibold text-[#3ECB78] transition-colors hover:text-[#2da765]";function i({visible:e,onClose:t,title:s,value:n,emptyText:d}){let[c,m]=(0,a.useState)(!1),u=n?.trim()?n:d;return(0,a.useEffect)(()=>{e&&m(!1)},[e]),(0,r.jsx)(l.A,{visible:e,onClose:t,dialogClasses:"!w-[calc(100%-2rem)] max-w-[20rem] !p-0 !rounded-[18px] !space-y-0 !overflow-visible z-[5000]",hideCloseIcon:!0,showBg:!1,children:(0,r.jsxs)("div",{className:"rounded-[18px] bg-white px-6 py-5 shadow-xl dark:bg-[#0d0f14]",children:[(0,r.jsx)("h2",{className:"mb-3 text-[1.05rem] font-semibold text-gray-900 dark:text-gray-100",children:s}),(0,r.jsx)("p",{className:"mb-6 text-sm break-all text-gray-600 dark:text-gray-300",children:u}),(0,r.jsxs)("div",{className:"flex justify-end space-x-5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>{n&&"u">typeof navigator&&(navigator.clipboard?.writeText(n),m(!0))},className:o,children:c?"Copied":"COPY"}),(0,r.jsx)("button",{type:"button",onClick:t,className:o,children:"CLOSE"})]})]})})}},57771:(e,t,s)=>{s.d(t,{y:()=>P});var r=s(37876),a=s(87569),l=s(4848),o=s(51178),i=s(14232),n=s(64177),d=s(27250),c=s(88992),m=s(71090),u=s(2827),x=s(28255),h=s(82271),g=s(13734),p=s(9087),b=s(27902),f=s(54511),v=s(21648),y=s(89099),j=s(22522),N=s(21324),C=s(55851),w=s(15094),k=s(37927),S=s(25564);let A=Object.keys(x.hF.fields),E=e=>(0,r.jsx)("label",{className:"text-[14px] font-semibold dark:bg-[#0d0f14] mb-0",...e,children:e.text}),B=[{title:"Business Profile",subtitle:"Set up your business",longerSubtitle:"Establish your business identity with key details and visuals"},{title:"Digital Presence",subtitle:"Add website & social",longerSubtitle:"Connect your business with the online world through websites and s
1ocial media"},{title:"Achievements & Recognition",subtitle:"Showcase achievements",longerSubtitle:"Showcase your awards and industry recognitions"},{title:"Locations & Accessibility",subtitle:"Add business locations",longerSubtitle:"Add business addresses to help customers find you easily"},{title:"Team & Permissions",subtitle:"Manage your team",longerSubtitle:"Assign team members who can manage and grow your business page"},{title:"Call-to-Action Buttons",subtitle:"Configure CTAs",longerSubtitle:"Set up action buttons to drive customer engagement and transactions"}],F=({currentStep:e,onStepClick:t})=>(0,r.jsx)("div",{className:"border-r-2 pt-12 pb-[5rem]",children:(0,r.jsx)("div",{className:"relative",children:B.map((s,a)=>{let l=0===a,o=a===B.length-1,n=a===B.length-2;return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)("div",{onClick:()=>t(a),className:`cursor-pointer flex items-center relative justify-end ${l?"pb-[32px] pl-[30px] pr-[48px]":o?"pt-[32px] pl-[30px] pr-[48px]":"py-[32px] pl-[30px] pr-[48px]"}`,children:(0,r.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,r.jsxs)("div",{className:"text-right",children:[(0,r.jsx)("div",{className:"font-semibold",children:s.title}),(0,r.jsx)("div",{className:"text-sm text-gray-500",children:s.subtitle})]}),(0,r.jsx)("div",{className:`w-[3.25rem] h-[3.25rem] text-normal rounded-full flex-none flex flex-col items-center justify-center z-10 ${a<=e?"bg-[#3ECB78] text-white":"bg-gray-200 text-gray-600"}`,children:a+1}),(0,r.jsx)("div",{className:`w-4 h-4 border rounded-full absolute top-auto bottom-auto left-auto -right-[9px] ${a<=e?"bg-[#3ECB78] text-white":"bg-gray-200 text-gray-600"}`})]})}),n&&(0,r.jsx)("div",{className:"h-full w-0.5 absolute top-0 bottom-0 left-auto right-[72px] bg-[#e5e7eb]"})]},s.title)})})}),D=({currentStep:e,onStepClick:t})=>(0,r.jsx)("div",{className:"flex justify-between py-3 sm:pb-3",children:B.map((s,a)=>(0,r.jsx)("div",{onClick:()=>t(a),className:`${a===e?"text-[#3ECB78]":"text-gray-500"}`,children:(0,r.jsx)("div",{className:`w-[2.5rem] h-[2.5rem] text-normal rounded-full flex-none flex items-center justify-center ${a<=e?"bg-[#3ECB78] text-white":"bg-gray-200 text-gray-600"}`,children:a+1})},s.title))}),P=({organizationInfo:e})=>{let t,[s,P]=(0,i.useState)(0),{user:L}=(0,S.h)(),{register:z,handleSubmit:I,getValues:T,formState:{errors:M,touchedFields:O,isSubmitting:R},setValue:U,trigger:Y}=(0,c.mN)({resolver:(0,m.t)(x.hF)}),$=(0,i.useMemo)(()=>!!T("avatar"),[T("avatar")]),Q=(0,i.useMemo)(()=>!!T("background"),[T("background")]),[V,q]=(0,i.useState)(!1),[G,J]=(0,i.useState)(!1),[W,_]=(0,i.useState)(),[K,X]=(0,i.useState)(!0),[H,Z]=(0,i.useState)([]),[ee,et]=(0,i.useState)([]),[es,er]=(0,i.useState)(null),[ea,el]=(0,i.useState)([]),[eo,ei]=(0,i.useState)(null),[en,ed]=(0,i.useState)(null),[ec,em]=(0,i.useState)(null),[eu,ex]=(0,i.useState)(!1),[eh,eg]=(0,i.useState)(!1),[ep,eb]=(0,i.useState)(!1),[ef,ev]=(0,i.useState)(null),[ey,ej]=(0,i.useState)(0),[eN,eC]=(0,i.useState)(void 0),[ew,ek]=(0,i.useState)(!1),[eS,eA]=(0,i.useState)(null),[eE,eB]=(0,i.useState)(!1),[eF,eD]=(0,i.useState)(void 0),[eP,eL]=(0,i.useState)(!1),[ez,eI]=(0,i.useState)([]),[eT,eM]=(0,i.useState)(!1),eO=(0,i.useMemo)(()=>e?.ecommercePresences||[],[e]),eR=(0,i.useRef)(null),eU=(0,y.useRouter)(),eY=e?.id?h.s4:h.rF,[e$]=(0,n.n)(eY,{onCompleted:t=>{console.log("Mutation completed with data:",t);let s=e?.id?t.updateOrganization:t.createOrganization;s?(console.log("Result Object:",s),console.log("Slug:",s.slug),console.log("Organization ID:",s.id),console.log("Avatar:",s.avatar),g.oR.success("Business page successfully updated!"),ev(s.slug),ej(s.id),eC(s.avatar||void 0),eb(!0)):console.error("No organization data returned. Check response structure.")},onError:e=>{console.error("GraphQL Error:",e),console.error("Error Details:",e.message,e.networkError,e.graphQLErrors),g.oR.error("An error occurred while submitting the form.")}}),{data:eQ,loading:eV}=(0,d.IT)(h.ph),eq=eQ?.organizationCategories.filter(e=>!e.parentId)||[],eG=eo?.value&&eQ?.organizationCategories.filter(e=>e.parentId?.toString()===eo.value)||[],eJ=en?.value&&eQ?.organizationCategories.filter(e=>e.parentId?.toString()===en.value)||[];console.log("Category arrays:",{topLevelCount:eq.length,secondLevelCount:eG.length,thirdLevelCount:eJ.length,selectedCategoryValue:eo?.value,selectedSubcategoryValue:en?.value,selectedCategory:eo,selectedSubcategory:en,selectedThirdLevelCategory:ec,organizationCategoryStructure:e?.organizationCategory}),(0,i.useEffect)(()=>{console.log("Categories state changed:",{selectedCategory:eo,selectedSubcategory:en,selectedThirdLevelCategory:ec})},[eo,en,ec]);let[eW]=(0,n.n)(h.bk),[e_]=(0,n.n)(h.N$),[eK]=(0,n.n)(h.Vd),[eX]=(0,n.n)(h.f4),[eH,eZ]=(0,i.useState)([]),[e0,e2]=(0,i.useState)("all"),[e1,e3]=(0,i.useState)("all"),e5=async e=>{e.preventDefault(),await Y()&&(s<B.length-1?P(e=>Math.min(e+1,B.length-1)):eg(!0))};(0,i.useEffect)(()=>
1{if(sessionStorage.getItem("isPreviewing")){let e=sessionStorage.getItem("businessFormData");if(e){let t=JSON.parse(e);Object.entries(t).forEach(([e,t])=>{"category"!==e&&"subCategory"!==e&&"thirdLevelCategory"!==e&&U(e,t)}),t.category&&ei(t.category),t.subCategory&&ed(t.subCategory),t.thirdLevelCategory&&em(t.thirdLevelCategory),t.members&&el(t.members),t.locations&&Z(t.locations),t.awards&&eI(t.awards),t.ecommercePresences&&et(t.ecommercePresences),sessionStorage.removeItem("isPreviewing")}}else sessionStorage.removeItem("businessFormData")},[U]);let e7=async t=>{try{console.log("Submitting form with data:",t),console.log("Organization Info:",e);let s={...t};e?.id&&(s.id=e.id),console.log("Mutation Variables:",s);let r=await e$({variables:s});console.log("API Response:",r);let a=r.data.updateOrganization?.id||r.data.createOrganization?.id;if(console.log("Extracted Organization ID:",a),!a)return void console.error("Organization ID is missing. Check response structure.");let l=e?.awards||[],o=ez.filter(e=>!l.some(t=>t.name===e.name));o.length>0&&await Promise.all(o.map(e=>eW({variables:{organizationId:a,name:e.name,issuer:e.issuer,dateReceived:e.dateReceived?new Date(e.dateReceived).toISOString():null}}).catch(e=>console.error("Award error:",e))));let i=e?.locations||[],n=H.filter(e=>!i.some(t=>t.name===e.name));n.length>0&&await Promise.all(n.map(e=>e_({variables:{organizationId:a,country:e.country,city:e.city,name:e.name,addressLine1:e.addressLine1,addressLine2:e.addressLine2,postalCode:e.postalCode}}).catch(e=>console.error("Location error:",e))));let d=Array.from(new Set(ee.map(e=>e.url))).map(e=>ee.find(t=>t.url===e)).filter(e=>e&&!eO.some(t=>t.url===e.url));d.length>0&&!eT&&(eM(!0),await Promise.all(d.map(e=>eK({variables:{organizationId:a,platform:e?.platform??"",url:e?.url??""}}).catch(e=>console.error("Ecommerce error:",e)))),eM(!1)),ea.length>0&&(console.log("Adding members:",ea),await Promise.all(ea.map(e=>e6({variables:{organizationId:a,userId:e.id}}).catch(e=>console.error("Member error:",e)))));let c=r.data?.updateOrganization?.slug||r.data?.createOrganization?.slug;console.log("Generated Slug:",c),ev(c),eb(!0)}catch(e){console.error("Full Error Details:",e),g.oR.error("An error occurred")}},{data:e8,loading:e4}=(0,d.IT)(h.Fs,{variables:{slug:e?.slug},skip:!e?.slug});(0,i.useEffect)(()=>{if(console.log("useEffect running:",{hasOrgInfo:!!e?.id,hasOrgCategory:!!e?.organizationCategory,hasCategoriesData:!!eQ?.organizationCategories,categoriesLoading:eV,orgCategoryStructure:e?.organizationCategory}),e?.id){if(Object.entries(e).forEach(([e,t])=>{A.includes(e)&&null!==t&&U(e,t,{shouldTouch:!0})}),e.organizationCategory&&eQ?.organizationCategories&&!eV){let t=e.organizationCategory;if(console.log("Populating categories with:",t),t.parent?.parent){let e=t.parent.parent,s=t.parent;console.log("Setting third-level categories:",{topCategory:e,subCategory:s,thirdCategory:t}),ei({value:e.id.toString(),label:e.name}),ed({value:s.id.toString(),label:s.name}),em({value:t.id.toString(),label:t.name})}else if(t.parent){let e=t.parent;console.log("Setting second-level categories:",{topCategory:e,subCategory:t}),ei({value:e.id.toString(),label:e.name}),ed({value:t.id.toString(),label:t.name}),em(null)}else console.log("Setting top-level category:",t),ei({value:t.id.toString(),label:t.name}),ed(null),em(null)}if(e.locations&&Array.isArray(e.locations)&&Z(e.locations.map(e=>({id:e.id,name:e.name,addressLine1:e.addressLine1,addressLine2:e.addressLine2,city:e.city,country:e.country,postalCode:e.postalCode}))),e.awards&&Array.isArray(e.awards)&&eI(e.awards.map(e=>({id:e.id,name:e.name,issuer:e.issuer,dateReceived:new Date(e.dateReceived)}))),e.eCommerce&&Array.isArray(e.eCommerce)&&et(e.eCommerce.map(e=>({id:e.id,platform:e.platform,url:e.url}))),e8?.getOrganizationMembers&&el(e8.getOrganizationMembers.map(e=>({id:e.id,firstName:e.firstName,lastName:e.lastName,avatar:e.avatar,username:e.username}))),e.enhancedCTAs)try{let t=JSON.parse(e.enhancedCTAs);eZ(t)}catch(e){console.error("Error parsing enhanced CTAs:",e)}e.businessType&&e2(e.businessType)}},[e,e8,U,eQ,eV]);let[e6]=(0,n.n)(h.SL,{onCompleted:()=>{_(null),X(!0)},refetchQueries:[{query:h.Fs,variables:{slug:eU?.query?.slug??""}}]});(0,i.useEffect)(()=>{e&&(Z(e.locations||[]),et(e.eCommerce||[]),eI(e.awards||[]))},[e]);let e9=(e,t,s)=>{let r=[...H];r[e]={...r[e],[t]:s},Z(r)},te=(e,t,s)=>{let r=[...ee];r[e]={...r[e],[t]:s},et(r)},tt=(e,t,s)=>{let r=[...ez],a="dateReceived"===t&&"string"==typeof s?new Date(s):s;r[e]={...r[e],[t]:a},eI(r)}
1,ts=e=>{P(e),eg(!1)},tr=e=>{eZ(t=>t.includes(e)?t.filter(t=>t!==e):t.length<4?[...t,e]:t)},ta=(e,t)=>{eZ(s=>{let r=s.indexOf(e);if(-1===r)return s;let a=[...s];if("up"===t&&r>0)[a[r-1],a[r]]=[a[r],a[r-1]];else{if("down"!==t||!(r<a.length-1))return s;[a[r+1],a[r]]=[a[r],a[r+1]]}return a})},tl=e=>{eZ(t=>{let s=t.indexOf(e);if(s<=0)return t;let r=[...t];return r.splice(s,1),r.unshift(e),r})};L?.roles?.includes("ADMIN");let to=()=>!!L&&!!e&&!!(L.roles?.includes("ADMIN")||e.owner?.id===L.id||e.members?.some(e=>e.userId===L.id)),ti=async()=>{if(!e?.id)return void g.oR.error("Organization ID is required");try{await eX({variables:{organizationId:e.id,enhancedCTAs:JSON.stringify(eH),businessType:e0}}),g.oR.success("CTAs saved successfully!")}catch(e){console.error("Error saving CTAs:",e),g.oR.error("Failed to save CTAs")}};(0,i.useEffect)(()=>{function e(e){eR.current&&!eR.current.contains(e.target)&&ex(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);let tn=(0,i.useMemo)(()=>T("phoneNumber"),[T("phoneNumber")]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("form",{onSubmit:I(e=>{let t=ec?.value||en?.value||eo?.value;e7({...e,categoryId:t?parseInt(t,10):void 0,locations:H,eCommerce:ee,awards:ez})}),children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("div",{className:"mb-[42px]",children:[(0,r.jsx)("div",{className:"sm:hidden bg-white dark:bg-[#0d0f14] fixed top-0 py-2 left-0 right-0 z-[1000]",children:(0,r.jsx)("h2",{className:"text-2xl text-center sm:text-start sm:text-[2.375rem] font-medium sm:font-bold",children:e?.id?"Update Business Page":"Create Business Page"})}),(0,r.jsx)("div",{className:"hidden sm:block",children:(0,r.jsx)("h2",{className:"text-2xl text-center sm:text-start sm:text-[2.375rem] font-medium sm:font-bold",children:e?.id?"Update Business Page":"Create Business Page"})}),(0,r.jsx)("p",{className:"text-base font-normal mt-[4rem] sm:mt-2",children:e?.id?"Update your business page information":"Fill in the form to create a business page"})]}),(0,r.jsxs)("div",{className:`relative sm:flex flex-col sm:flex-row justify-between items-start h-auto relative sm:border-t ${eh?"gap-0":"gap-[2rem]"}`,children:[(0,r.jsx)("div",{className:"hidden sm:block",children:(0,r.jsx)(F,{currentStep:s,onStepClick:ts})}),(0,r.jsx)("div",{className:"block sm:hidden overflow-x-scroll sticky top-[2.85rem] z-10 bg-white dark:bg-[#0d0f14]",children:(0,r.jsx)(D,{currentStep:s,onStepClick:ts})}),!eh&&(0,r.jsxs)("div",{className:"grow pt-12",children:[(0,r.jsxs)("div",{className:`${0===s?"mb-[5rem] sm:mb-0":"mb-[8.5rem] sm:mb-0"}`,children:[(0,r.jsxs)("div",{className:"mb-5 text-center",children:[(0,r.jsx)("h2",{className:"text-[1.75rem] font-bold",children:B[s].title}),(0,r.jsx)("p",{className:"text-[1rem] font-normal",children:B[s].longerSubtitle})]}),0===s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row flex-wrap sm:items-center gap-3 justify-between",children:[(0,r.jsxs)(o.cl,{className:"flex-1 mt-3",touched:O.name,error:M.name,children:[(0,r.jsx)(E,{text:"Business Name",htmlFor:"name"}),(0,r.jsx)(o.ks,{placeholder:"Business Name",...z("name"),autoFocus:!0,className:"focus:ring-[#3ECB78] focus:border-[#3ECB78]"})]}),(0,r.jsxs)(o.cl,{className:"flex-1 mt-3",touched:O.slug,error:M.slug,children:[(0,r.jsx)(E,{text:"Business Username",htmlFor:"slug"}),(0,r.jsx)(o.ks,{placeholder:"Business Username",...z("slug"),className:"focus:ring-[#3ECB78] focus:border-[#3ECB78]"})]})]}),(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row flex-wrap sm:items-start gap-3 justify-between",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsxs)(o.cl,{className:"flex-1 mt-3",touched:O.category,error:M.category,children:[(0,r.jsx)(E,{text:"Category",htmlFor:"category"}),(0,r.jsx)(u.Ay,{value:eo,options:eq.map(e=>({value:e.id.toString(),label:e.name})),onChange:e=>{ei(e),ed(null),em(null)},placeholder:"Select Category",className:"custom-select w-full cursor-pointer",classNamePrefix:"react-select",styles:{control:(e,t)=>({...e,cursor:"pointer",borderColor:t.isFocused?"#3ECB78":e.borderColor,boxShadow:t.isFocused?"0 0 0  #3ECB78":e.boxShadow,"&:hover":{borderColor:"#3ECB78"}}),option:(e,t)=>({...e,cursor:"pointer",backgroundColor:t.isSelected?"#3ECB78":t.isFocused?"#e6f5ea":"white",color:t.isSelected?"white":"black","&:hover":{backgroundColor:"#e6f5ea",color:"#3ECB78"}})}})]}),eo&&(0,r.jsx)(o.cl,{className:"flex-1 mt-3",touched:O.subCategory,error:M.subCategory,children:(0,r.jsx)(u.Ay,{value:en,options:eG.map(e=>({value:e.id.toString(),label:e.name})),onChange:e=>{ed(e),em(null)},placeholder:"Select Subcategory",className:"custom-select w-full cursor-pointer",classNamePrefix:"react-select",styles:{control:(e,t)=>({...e,cursor:"pointer",borderColor:t.isFocused?"#3ECB78":e.borderColor,boxShadow:t.isFocused?"0 0 0  #3ECB78":e.boxShadow,"&:hover":{borderColor:"#3ECB78"}}),option:(e,t)=>({...e,cursor:"pointer",backgroundColor:t.isSelected?"#3ECB78":t.isFocused?"#e6f5ea":"white",color:t.isSelected?"white":"black","&:hover":{backgroundColor:"#e6f5ea",color:"#3ECB78"}})}})}),en&&(0,r.jsx)(o.cl,{className:"flex-1 mt-3",touched:O.thirdLevelCategory,error:M.thirdLevelCategory,children:(0,r.jsx)(u.Ay,{value:ec,options:eJ.map(e=>({value:e.id.toString(),label:e.name})),onChange:e=>em(e),placeholder:"Select Third-Level Category",className:"custom-select w-full cursor-pointer",classNamePrefix:"react-select",styles:{control:(e,t)=>({...e,cursor:"pointer",borderColor:t.isFocused?"#3ECB78":e.borderColor,boxShadow:t.isFocused?"0 0 0  #3ECB78":e.boxShadow,"&:hover":{borderColor:"#3ECB78"}}),option:(e,t)=>({...e,cursor:"pointer",backgroundColor:t.isSelected?"#3ECB78":t.isFocused?"#e6f5ea":"white",color:t.isSelected?"white":"black","&:hover":{backgroundColor:"#e6f5ea",color:"#3ECB78"}})}})}),(0,r.jsxs)(o.cl,{labelFor:"phoneNumber",touched:O.phoneNumber,error:M.phoneNumber,className:"flex-1 mt-5 relative",children:[(0,r.jsx)(E,{text:"Business Phone Number",htmlFor:"phoneNumber"}),(0,r.jsx)(w.LR,{defaultCountry:"rw",value:tn,placeholder:"Phone number",inputClassName:"w-full",onCh
1ange:e=>{U("phoneNumber",e,{shouldTouch:!0,shouldValidate:!0})}})]})]}),(0,r.jsxs)(o.cl,{className:"flex-1 mt-3",touched:O.establishedYear,error:M.establishedYear,children:[(0,r.jsx)(E,{text:"Established Year",htmlFor:"establishedYear"}),(0,r.jsx)(o.ks,{type:"number",placeholder:"e.g., 2020",...z("establishedYear"),className:"focus:ring-[#3ECB78] focus:border-[#3ECB78]"})]})]}),(0,r.jsx)("div",{}),(0,r.jsxs)("div",{className:"text-xs sm:text-base flex flex-wrap items-center gap-3 justify-between",children:[(0,r.jsx)(o.cl,{touched:O.avatar,error:M.avatar,className:"flex-1 mt-3",children:(0,r.jsx)(p.A,{label:$?"✅ Update Logo":"Upload Logo",accept:"image/*",onChange:e=>{if(!e||0===e.length)return;let t=e[0];(0,b.f5)(t,q,"organization-logos").then(e=>{U("avatar",e,{shouldTouch:!0,shouldValidate:!0})})},isUploading:V})}),(0,r.jsx)(o.cl,{touched:O.background,error:M.background,className:"flex-1 mt-3",children:(0,r.jsx)(p.A,{label:Q?"✅ Update Background":"Upload Background",accept:"image/*",onChange:e=>{e&&(0,b.gG)(e,J,"organization-logos").then(e=>{U("background",e,{shouldTouch:!0,shouldValidate:!0})})},isUploading:G})})]}),(0,r.jsxs)(o.cl,{className:"mt-3",touched:O.description,error:M.description,children:[(0,r.jsx)(E,{text:"Description",htmlFor:"description"}),(0,r.jsx)("textarea",{rows:3,className:"w-full px-3 py-2 border border-gray-300 rounded text-sm placeholder:text-[0.75rem] focus:ring-[#3ECB78] focus:border-[#3ECB78] disabled:bg-gray-50 disabled:text-gray-500 disabled:border-gray-200 disabled:shadow-none dark:bg-transparent",placeholder:"Type your description here...",...z("description")})]})]}),1===s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.cl,{className:"mt-2",touched:O.websiteUrl,error:M.websiteUrl,children:[(0,r.jsx)(E,{text:"Website url",htmlFor:"websiteUrl"}),(0,r.jsx)(o.ks,{placeholder:"https://www.wazoplus.com",...z("websiteUrl")})]}),(0,r.jsxs)(o.cl,{className:"mt-3",touched:O.linkedinUrl,error:M.linkedinUrl,children:[(0,r.jsx)(E,{text:"Linkedin url",htmlFor:"linkedinUrl"}),(0,r.jsx)(o.ks,{placeholder:"https://www.linkedin.com/company/wazoplus",...z("linkedinUrl")})]}),(0,r.jsxs)(o.cl,{className:"mt-3",touched:O.twitterUrl,error:M.twitterUrl,children:[(0,r.jsx)(E,{text:"X url",htmlFor:"twitterUrl"}),(0,r.jsx)(o.ks,{placeholder:"https://x.com/Wazoplus",...z("twitterUrl")})]}),(0,r.jsxs)(o.cl,{className:"mt-3",touched:O.instagramUrl,error:M.instagramUrl,children:[(0,r.jsx)(E,{text:"Instagram url",htmlFor:"instagramUrl"}),(0,r.jsx)(o.ks,{placeholder:"https://www.instagram.com/wazo__plus",...z("instagramUrl")})]}),(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)(E,{text:"E-commerce Presence"}),ee.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col gap-2 mt-2 p-3 border rounded",children:[(0,r.jsx)(o.ks,{placeholder:"Platform",value:e.platform,onChange:e=>te(t,"platform",e.target.value)}),(0,r.jsx)(o.ks,{placeholder:"URL",value:e.url,onChange:e=>te(t,"url",e.target.value)}),(0,r.jsx)("button",{type:"button",onClick:()=>{et(ee.filter((e,s)=>s!==t))},className:"text-xs sm:text-sm self-end px-2 py-1 text-red-500 hover:text-red-700",children:"Remove E-commerce Presence"})]},t)),(0,r.jsx)("button",{type:"button",onClick:()=>{et([...ee,{platform:"",url:""}])},className:"text-xs sm:text-sm mt-2 text-sm text-[#3ECB78] hover:text-[#3ECB78]",children:"+ Add E-commerce Presence"})]})]}),2===s&&(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)(E,{text:"Awards & Recognition"}),ez.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col gap-2 mt-2 p-3 border rounded",children:[(0,r.jsx)(o.ks,{placeholder:"Award Name",value:e.name,onChange:e=>tt(t,"name",e.target.value)}),(0,r.jsx)(o.ks,{placeholder:"Issuer",value:e.issuer,onChange:e=>tt(t,"issuer",e.target.value)}),(0,r.jsx)("input",{type:"date",value:e.dateReceived?new Date(e.dateReceived).toISOString().split("T")[0]:"",onChange:e=>tt(t,"dateReceived",e.target.value?new Date(e.target.value):new Date),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm bg-transparent"}),(0,r.jsx)("button",{type:"button",onClick:()=>{eI(ez.filter((e,s)=>s!==t))},className:"text-xs sm:text-sm self-end px-2 py-1 text-red-500 hover:text-red-700",children:"Remove Award"})]},t)),(0,r.jsx)("button",{type:"button",onClick:()=>{eI([...ez,{name:"",issuer:"",dateReceived:new Date}])},className:"text-xs sm:text-sm mt-2 text-sm text-[#3ECB78] hover:text-[#3ECB78]",children:"+ Add Award"})]}),3===s&&(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)(E,{text:"Locations"}),H.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col gap-2 mt-2 p-3 border rounded",children:[(0,r.jsx)(o.ks,{placeholder:"Name",value:e.name,onChange:e=>e9(t,"name",e.target.value)}),(0,r.jsx)(o.ks,{placeholder:"Country",value:e.country,onChange:e=>e9(t,"country",e.target.value)}),(0,r.jsx)(o.ks,{placeholder:"City",value:e.city,onChange:e=>e9(t,"city",e.target.value)}),(0,r.jsx)(o.ks,{placeholder:"Address Line 1",value:e.addressLine1,onChange:e=>e9(t,"addressLine1",e.target.value)}),(0,r.jsx)(o.ks,{placeholder:"Address Line 2",value:e.addressLine2,onChange:e=>e9(t,"addressLine2",e.target.value)}),(0,r.jsx)(o.ks,{placeholder:"Postal Code",value:e.postalCode,onChange:e=>e9(t,"postalCode",e.target.value)}),(0,r.jsx)("button",{type:"button",onClick:()=>{Z(H.filter((e,s)=>s!==t))},className:"text-xs sm:text-sm self-end px-2 py-1 text-red-500 hover:text-red-700",children:"Remove Location"})]},t)),(0,r.jsx)("button",{type:"button",onClick:()=>{Z([...H,{country:"",city:"",name:"",addressLine1:"",addressLine2:"",postalCode:""}])},className:"text-xs sm:text-sm mt-2 text-sm text-[#3ECB78] hover:text-[#3ECB78]",children:"+ Add Location"})]}),4===s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(E,{text:"Add member",htmlFor:"instagramUrl"}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"mt-4 bg-white dark:bg-[#0d0f14] rounded-md",children:[(0,r.jsx)(f.d,{onSelect:e=>
1{er({id:+e.value,firstName:e.label.split(" ")[0],lastName:e.label.split(" ")[1],avatar:e.avatar,username:e.username})}}),(0,r.jsx)("div",{className:"text-right",children:(0,r.jsx)(a.PrimaryButton,{text:"Add member",className:"bg-primary text-white rounded-md w-[150px] h-[2rem] text-[0.85em] mt-2",onClick:()=>es?ea.some(e=>e.id===es.id)?g.oR.error("User is already added."):void(el([...ea,es]),er(null)):g.oR.error("Select a valid member, please!")})})]})})]}),(0,r.jsx)("div",{className:"my-2 flex items-center justify-between",children:(0,r.jsx)("h2",{className:"text-[1.125rem] font-semibold hidden sm:block",children:"Members"})})]}),(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)(E,{text:"Members"}),ea.map((e,t)=>(0,r.jsxs)("div",{className:"flex justify-between items-center gap-2 p-3 rounded",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"relative w-8 h-8",children:(0,r.jsx)(l.e,{src:e.avatar,alt:e.firstName})}),(0,r.jsxs)("div",{className:"text-xs sm:text-sm",children:[(0,r.jsxs)("div",{className:"",children:[e.firstName," ",e.lastName]}),(0,r.jsxs)("div",{className:"",children:["(@",e.username,")"]})]})]}),(0,r.jsx)("div",{children:(0,r.jsx)("button",{type:"button",onClick:()=>el(ea.filter(t=>t.id!==e.id)),className:"text-red-500 text-xs hover:text-red-700",children:"Remove"})})]},t))]})]}),5===s&&to()&&(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Configure Call-to-Action Buttons"}),(0,r.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:"Select up to 4 CTAs that will appear on your business profile. Choose CTAs that best match your business type and goals."}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)(E,{text:"Business Type"}),(0,r.jsx)("select",{value:e0,onChange:e=>e2(e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500",children:k.pW.map(e=>(0,r.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1).replace("-"," ")},e))})]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)(E,{text:"Category"}),(0,r.jsxs)("select",{value:e1,onChange:e=>e3(e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500",children:[(0,r.jsx)("option",{value:"all",children:"All Categories"}),k.WD.map(e=>(0,r.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1).replace("-"," ")},e))]})]}),(0,r.jsx)("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg",children:(0,r.jsxs)("p",{className:"text-sm text-blue-800",children:["Selected: ",eH.length,"/4 CTAs"]})}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 max-h-96 overflow-y-auto",children:(t=k.Jo,"all"!==e0&&(t=t.filter(e=>e.businessTypes.includes("all")||e.businessTypes.includes(e0))),"all"!==e1&&(t=t.filter(e=>e.category===e1)),t).map(e=>(0,r.jsx)("div",{className:`p-3 border rounded-lg cursor-pointer transition-all ${eH.includes(e.id)?"border-green-500 bg-green-50":"border-gray-200 hover:border-gray-300"} ${eH.length>=4&&!eH.includes(e.id)?"opacity-50 cursor-not-allowed":""}`,onClick:()=>tr(e.id),children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("input",{type:"checkbox",checked:eH.includes(e.id),onChange:()=>tr(e.id),className:"mt-1",disabled:eH.length>=4&&!eH.includes(e.id)}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,r.jsx)("span",{className:"text-lg",children:e.icon}),(0,r.jsx)("span",{className:"font-medium text-sm",children:e.text})]}),(0,r.jsx)("p",{className:"text-xs text-gray-600 mb-1",children:e.description}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs px-2 py-1 bg-gray-100 rounded-full",children:e.category}),e.b2bOnly&&(0,r.jsx)("span",{className:"text-xs px-2 py-1 bg-blue-100 text-blue-800 rounded-full",children:"B2B"}),e.b2cOnly&&(0,r.jsx)("span",{className:"text-xs px-2 py-1 bg-green-100 text-green-800 rounded-full",children:"B2C"})]})]})]})},e.id))}),eH.length>0&&(0,r.jsxs)("div",{className:"mt-6 p-4 bg-gray-50 rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsx)("h4",{className:"font-medium",children:"Selected CTAs & Priority"}),(0,r.jsx)("p",{className:"text-xs text-gray-500 max-w-xs",children:"Arrange your CTAs to set their display order. The first CTA is surfaced as the primary action across discovery sections."})]}),(0,r.jsx)("div",{className:"mt-4 space-y-3",children:eH.map((e,t)=>{let s=k.Jo.find(t=>
1t.id===e);if(!s)return null;let a=0===t;return(0,r.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 bg-white border border-gray-200 rounded-lg shadow-sm",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,r.jsx)("span",{className:"flex items-center justify-center w-6 h-6 rounded-full bg-green-100 text-xs font-semibold text-green-700",children:t+1}),(0,r.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),a||tl(e)},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||a||(t.preventDefault(),tl(e))},className:`text-sm ${a?"text-yellow-500 cursor-default":"text-gray-400 hover:text-yellow-500"} transition-colors`,disabled:a,title:a?"Primary CTA":"Make primary",children:a?"★":"☆"}),(0,r.jsx)("span",{className:"text-lg",children:s.icon}),(0,r.jsx)("span",{className:"text-sm font-medium text-gray-800 truncate",children:s.text})]}),(0,r.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,r.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),ta(e,"up")},className:"px-2 py-1 text-xs text-gray-500 hover:text-gray-800 disabled:opacity-40 disabled:hover:text-gray-500 transition-colors",disabled:0===t,title:"Move up",children:"↑"}),(0,r.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),ta(e,"down")},className:"px-2 py-1 text-xs text-gray-500 hover:text-gray-800 disabled:opacity-40 disabled:hover:text-gray-500 transition-colors",disabled:t===eH.length-1,title:"Move down",children:"↓"}),(0,r.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),tr(e)},className:"px-2 py-1 text-xs text-red-500 hover:text-red-600 transition-colors",title:"Remove CTA",children:"\xd7"})]})]},e)})})]}),(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsxs)("button",{onClick:ti,disabled:0===eH.length,className:"w-full px-4 py-3 bg-green-500 hover:bg-green-600 disabled:bg-gray-300 disabled:cursor-not-allowed text-white font-medium rounded-lg transition-colors",children:["Save CTAs (",eH.length,"/4)"]})})]})}),5===s&&!to()&&(0,r.jsx)("div",{className:"mt-3 text-center py-8",children:(0,r.jsxs)("div",{className:"text-gray-500",children:[(0,r.jsx)("svg",{className:"w-16 h-16 mx-auto mb-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),(0,r.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Access Required"}),(0,r.jsx)("p",{className:"text-gray-600",children:"CTA management is only available to business owners, members, or administrators. Contact your business administrator to configure call-to-action buttons."})]})})]}),(0,r.jsxs)("div",{className:"-ml-[1.5rem] sm:-ml-0 px-[1.5rem] sm:px-0 fixed bottom-0 w-[calc(100%)] sm:w-auto sm:static flex flex-col-reverse sm:flex-row sm:items-center sm:justify-end gap-4 sm:gap-[2rem] 
1sm:mt-[1rem] bg-white/70 dark:bg-[#0d0f14]/70 backdrop-blur-sm",children:[(0,r.jsx)("div",{children:s>0&&(0,r.jsx)(a.PrimaryButton,{text:"Back",onClick:()=>{P(e=>Math.max(e-1,0))},className:"w-full border-none px-[1.8rem] py-[0.8rem]"})}),(0,r.jsx)("div",{className:"relative",ref:eR,children:s===B.length-1?(0,r.jsx)("div",{className:"flex items-center justify-between relative",children:(0,r.jsx)(a.PrimaryButton,{text:"Complete Submission",type:"button",onClick:()=>eg(!0),className:"w-full rounded-full text-[1rem] hover:text-white dark:hover:text-white dark:text-black bg-gray-200 dark:bg-white hover:bg-primary dark:hover:bg-primary px-[1.8rem] py-[0.8rem] border-none"})}):(0,r.jsx)(a.PrimaryButton,{text:"Next Step",type:"button",onClick:e5,className:"w-full rounded-full text-[1rem] hover:text-white dark:hover:text-white dark:text-black bg-gray-200 dark:bg-white hover:bg-primary dark:hover:bg-primary px-[1.8rem] py-[0.8rem] border-none"})})]})]}),eh&&(0,r.jsxs)("div",{className:"sm:grow sm:p-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-center mb-4",children:"Review & Submit"}),(0,r.jsx)("p",{className:"text-gray-600 text-center",children:"Ensure everything is correct before proceeding."}),(0,r.jsxs)("div",{className:"fixed bottom-0 w-[calc(100%-3rem)] sm:w-auto sm:static flex flex-col-reverse sm:flex-row sm:justify-center sm:mt-6 gap-4 sm:space-x-4",children:[(0,r.jsx)(a.PrimaryButton,{text:"Preview",onClick:()=>{let t=T();t.establishedYear&&(t.establishedYear=Number(t.establishedYear));let r={...t,category:eo,subCategory:en,thirdLevelCategory:ec,members:ea,locations:H,awards:ez,ecommercePresences:ee};sessionStorage.setItem("businessFormData",JSON.stringify(r)),sessionStorage.setItem("isPreviewing","true"),sessionStorage.setItem("currentStep",JSON.stringify(s)),eU.push({pathname:"/business/preview",query:{isEditing:e?.id?"true":"false"}})},className:"rounded-full text-[1rem] px-[1.8rem] py-[0.8rem] border-0 sm:border"}),(0,r.jsx)(a.PrimaryButton,{text:e?.id?"Update":"Create",className:"rounded-full text-[1rem] text-white bg-primary px-[1.8rem] py-[0.8rem] border-none",type:"submit",disabled:R})]})]})]}),(0,r.jsx)(v.A,{visible:ep,onClose:()=>eb(!1),dialogClasses:"w-[90vw] md:w-full h-[100vh]",hideCloseIcon:!0,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-center text-xl sm:text-[2.375rem] font-bold mb-3",children:"\uD83C\uDF89 Congratulations! Your Business Page is Live!"}),(0,r.jsxs)("div",{className:"text-sm sm:text-base w-fit mx-auto",children:[(0,r.jsx)("p",{className:"mb-1",children:"You've successfully created your business page on WazoPlus! Now it's time to build your brand, showcase your products, and connect with your audience. \uD83D\uDE80"}),(0,r.jsx)("p",{children:"Make the most of your new business profile by adding key details that will help customers discover and engage with your brand."})]}),(0,r.jsxs)("div",{className:"mb-[5rem] sm:mb-0",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold mt-4",children:"Next Steps:"}),(0,r.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-col space-y-2 border p-2 bg-[#F7F7F7] dark:bg-[#0d0f14] rounded-lg",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold text-xl",children:"Add Your Products/Services"}),(0,r.jsx)("div",{className:"italic",children:"Showcase your products or services to potential customers."})]}),(0,r.jsx)("div",{children:(0,r.jsx)(a.PrimaryButton,{text:"Let's Go",onClick:()=>{ek(!0)},className:"rounded-full bg-primary text-white text-sm px-[0.85rem] py-[0.25rem] border-none"})})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-2 border p-2 bg-[#F7F7F7] dark:bg-[#0d0f14] rounded-lg",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold text-xl",children:"Add Your Business FAQs"}),(0,r.jsx)("div",{className:"italic",children:"Answer common questions to build trust with your audience."})]}),(0,r.jsx)("div",{children:(0,r.jsx)(a.PrimaryButton,{text:"Let's Go",onClick:()=>void(eD({label:"FAQs",tags:["FAQs"]}),eB(!0)),className:"rounded-full bg-primary text-white text-sm px-[0.85rem] py-[0.25rem] border-none"})})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-2 border p-2 bg-[#F7F7F7] dark:bg-[#0d0f14] rounded-lg",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold text-xl",children:"Create an Event/Webinar"}),(0,r.jsx)("div",{className:"italic",children:"Promote upcoming events and reach a wider audience."})]}),(0,r.jsx)("div",{children:(0,r.jsx)(a.PrimaryButton,{text:"Let's Go",onClick:()=>{eL(!0)},className:"rounded-full bg-primary dark text-white text-sm px-[0.85rem] py-[0.25rem] border-none"})})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-2 border p-2 bg-[#F7F7F7] dark:bg-[#0d0f14] rounded-lg",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold text-xl",children:"Post Your First Update"}),(0,r.jsx)("div",{className:"italic",children:"Share a post to introduce your business to WazoPlus users."})]}),(0,r.jsx)("div",{children:(0,r.jsx)(a.PrimaryButton,{text:"Let's Go",onClick:()=>{eB(!0),eD(void 0)},className:"rounded-full bg-primary text-white text-sm px-[0.85rem] py-[0.25rem] border-none"})})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-2 border p-2 bg-[#F7F7F7] dark:bg-[#0d0f14] rounded-lg",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold text-xl",children:"Edit Your Business Profile"}),(0,r.jsx)("div",{className:"italic",children:"Fine-tune your details anytime for a perfect business page."})]}),(0,r.jsx)("div",{children:(0,r.jsx)(a.PrimaryButton,{text:"Let's Go",onClick:()=>{eb(!1),ts(0)},className:"rounded-full bg-primary text-white text-sm px-[0.85rem] py-[0.25rem] border-none"})})]})]})]}),(0,r.jsx)("div",{className:"-ml-[2rem] sm:-ml-0 px-[2.5rem] sm:px-0 fixed bottom-0 pb-[1rem] sm:w-auto 
1sm:static w-[calc(100%)] flex justify-end space-x-3 mt-4 bg-white/70 dark:bg-[#0d0f14]/70 backdrop-blur-sm",children:(0,r.jsx)(a.PrimaryButton,{text:"Skip & Go To Business Page",onClick:()=>{eb(!1),ef&&eU.push(`/business/${ef}?action=update`)},className:"rounded-full text-[1rem] px-[2.75rem] py-[1.25rem] border"})})]})})]})}),(0,r.jsx)(j.A,{isVisible:ew,onFormClose:()=>{ek(!1),eA(null)},selectedProduct:eS,organizationId:ey}),(0,r.jsx)(N.A,{isModalOpen:eE,setIsModalOpen:eB,nextCursor:null,numberOfPosts:15,organizationId:ey,organizationAvatar:eN,postTagData:eF}),(0,r.jsx)(C.Q,{isModalOpen:eP,setIsModalOpen:eL,nextCursor:null,organizationId:ey})]})}},76319:(e,t,s)=>{s.d(t,{A:()=>y,e:()=>v});var r=s(37876),a=s(14232),l=s(27250),o=s(64177),i=s(10841),n=s.n(i),d=s(48230),c=s.n(d),m=s(22464),u=s(89099),x=s.n(u),h=s(7776),g=s(99762),p=s(13734),b=s(61737),f=s(69779);let v=({article:e,onArticleAction:t})=>(0,r.jsxs)("div",{className:"single-article-card sm:w-[48rem] my-[15px] mx-auto p-[15px] dark:bg-[#0d0f14] bg-white rounded-lg",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)("div",{className:"font-semibold text-[0.875rem]",children:(0,r.jsx)(c(),{href:`/article/${e.slug}`,children:e.title})}),(0,r.jsx)("div",{children:(0,r.jsx)(b.O,{items:[{label:"Edit",handle:()=>t(e,"edit")},{label:"Delete",handle:()=>t(e,"delete")}]})})]}),(0,r.jsx)("div",{className:"font-normal text-[0.75rem] mt-4",children:e.summary}),(0,r.jsx)("div",{className:"flex justify-between mt-4",children:(0,r.jsxs)("div",{className:"text-[0.75rem] text-gray-400",children:["created: ",n()(e.creationTime).format("LL")]})})]}),y=function(e){let[t,s]=(0,a.useState)(),[i,n]=(0,a.useState)(!1),{data:d,loading:c,error:u}=(0,l.IT)(g.XK),b=d?.fetchMyExternusesAndArticles?.externuses,y=b?.filter(e=>!0===e.isActive)||[],j=d?.fetchMyExternusesAndArticles?.newsItems??[],N=[...y,...j],[C,{loading:w}]=(0,o.n)(m.jE,{onCompleted({deleteArticle:e}){p.oR.success(e.message)},refetchQueries:[{query:g.XK}]}),k=(e,t)=>{if(s(e),"edit"===t)"Externus"===e.__typename?n(!0):x().push(h.A.editArticle+"/"+e.slug);else if("delete"==t){if(w)return;C({variables:{slug:e.slug}})}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{children:[c&&(0,r.jsx)("h2",{className:"text-center",children:"Loading articles…"}),!c&&u&&!d?.fetchMyExternusesAndArticles&&(0,r.jsx)("h2",{className:"text-center",children:u.message||"Unable to load your articles. Please try again."}),!c&&!u&&!y.length&&!j.length&&(0,r.jsx)("h2",{className:"text-center",children:"You haven't any published article"}),N?.sort((e,t)=>t.creationTime-e.creationTime)?.map((e,t)=>(0,r.jsx)(v,{article:e,onArticleAction:k},t))]}),(0,r.jsx)(f.A,{isModalOpen:i,setIsModalOpen:n,nextCursor:null,externus:t})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.