return googleDocEpicControl().then(copy => { const rawEpic = acquisitionsEpicControlTemplate({ copy, componentName: '', // TODO: confirm data-component not needed buttonTemplate: epicButtonsTemplate({ supportUrl: addTrackingCodesToUrl({ base: supportContributeURL, componentType: epicComponentType, componentId: epicId, campaignCode: epicId, abTest, }), }), testimonialBlock, epicClass: '', wrapperClass: '', }); const epicElement = $.create(rawEpic).get(0); return { html: epicElement, componentEvent: { component: { componentType: epicComponentType, id: epicId, }, abTest, }, }; });
const defaultButtonTemplate: (CtaUrls, ctaText?: string) => string = ( url: CtaUrls, ctaText?: string ) => epicButtonsTemplate(url, ctaText);