import{s as e,_ as t}from"./style-inject.es-f40f6556.js";import{Popover as i}from"@transferwise/components";import{AlertCircle as o}from"@transferwise/icons";import r from"prop-types";import n from"react";import{useIntl as a}from"react-intl";import{t as s,h as c,f as l}from"./deliveryEstimationFormatter-66e6704d.js";import{i as m}from"./aliasFilter-2aa038b5.js";function d(e,t){return e||m(t)}var p=function(e,t,i,o,r){var n=function(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.providerGivesEstimate?c(e)?o?d(!1,i)?"tw-travel-money":"non-tw-travel-money":d(t,i)?"tw-powered":"non-tw-powered":"not-yet-collected":"provider-does-not-give-estimate"}(e,t,i,r),a="delivery-estimation.".concat(n,".citation");return{title:s("".concat(a,".title"),o),body:s("".concat(a,".body"),o)}},y={"delivery-estimation":"cc_delivery-estimation_3804785543",deliveryEstimation:"cc_delivery-estimation_3804785543","tw-icon":"cc_tw-icon_3804785543",twIcon:"cc_tw-icon_3804785543",btn:"cc_btn_3804785543","delivery-estimation-data":"cc_delivery-estimation-data_3804785543",deliveryEstimationData:"cc_delivery-estimation-data_3804785543","delivery-estimation-tool-tip":"cc_delivery-estimation-tool-tip_3804785543",deliveryEstimationToolTip:"cc_delivery-estimation-tool-tip_3804785543"};function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,o)}return i}function _(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?v(Object(o),!0).forEach(function(i){t(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}e('.cc_delivery-estimation_3804785543{display:flex;align-items:center}.cc_delivery-estimation_3804785543 .cc_tw-icon_3804785543,.cc_delivery-estimation_3804785543 [class^="tw-icon "]{display:inline}.cc_delivery-estimation_3804785543 .cc_tw-icon_3804785543 svg,.cc_delivery-estimation_3804785543 [class^="tw-icon "] svg{display:block}.cc_delivery-estimation_3804785543 [data-toggle=popover]:not(.cc_btn_3804785543){height:var(--size-16);border-bottom:0!important}@media (max-width:991px){.cc_delivery-estimation_3804785543{margin-top:unset}}.cc_delivery-estimation-data_3804785543{margin-right:var(--size-8);font-size:var(--font-size-14);font-weight:var(--font-weight-semi-bold)}.cc_delivery-estimation-tool-tip_3804785543{line-height:8px;cursor:pointer}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9jb21tb24vRGVsaXZlcnlFc3RpbWF0aW9uLm1vZHVsZS5sZXNzIiwiRGVsaXZlcnlFc3RpbWF0aW9uLm1vZHVsZS5sZXNzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLG1DQUNFLFlBQUEsQ0FDQSxrQkNERixDRERBLGlIQU1JLGNDREosQ0RMQSx5SEFTTSxhQ0FOLENEVEEsaUZBY0kscUJBQUEsQ0FDQSx5QkNGSixDREtFLHlCQUFBLG1DQUNFLGdCQ0ZGLENBQ0YsQ0RLQSx3Q0FDRSwwQkFBQSxDQUNBLDZCQUFBLENBQ0Esd0NDSEYsQ0RNQSw0Q0FDRSxlQUFBLENBQ0EsY0NKRiIsImZpbGUiOiJEZWxpdmVyeUVzdGltYXRpb24ubW9kdWxlLmxlc3MifQ== */');var b=function(e){var t=e.styles,r=e.deliveryEstimation,s=e.isPartner,c=e.alias,m=e.onClickingDeliveryEstimationTooltip,d=e.isTravelMoney,v=a().locale,b=_(_({},y),t),f=p(r,s,c,v,d);return n.createElement("div",{className:b["delivery-estimation"],"data-testid":"delivery-estimation"},n.createElement("span",{className:b["delivery-estimation-data"]},l(r,{lang:v})),n.createElement("span",{id:"delivery-estimation-tool-tip",onClick:m},f&&n.createElement(i,{classNames:b,title:f.title,content:f.body},n.createElement("div",null,n.createElement(o,{className:b["tw-help-icon"],"data-testid":"help-circle-icon",size:16})))))};b.propTypes={styles:r.shape({speed:r.string}),deliveryEstimation:r.shape({duration:r.shape({min:r.string,max:r.string}),providerGivesEstimate:r.bool}).isRequired,isPartner:r.bool.isRequired,alias:r.string.isRequired,onClickingDeliveryEstimationTooltip:r.func.isRequired,isTravelMoney:r.bool},b.defaultProps={styles:y,isTravelMoney:!1};export{b as D};
//# sourceMappingURL=DeliveryEstimation-a8be5c23.js.map
