PageSourceSearch

https://app.vacationtracker.io/use-currency-FGaxjrc3.js

js vacationtracker.io collected 2026-09-24 09:32:17 UTC 2,010 bytes, 2 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{Q as t,fs as n,n as r,r as i,ws as a}from"./hooks-DHnN4Bv4.js";import{t as o}from"./form-4k43wPKg.js";import{t as s}from"./radio-BQ-9v-Y6.js";import{g as c}from"./i18n-CK-RtRj-.js";import{n as l}from"./locale-slice-CMmLTHfZ.js";import{i as u}from"./auth-company-slice-D8EoCro9.js";var d=e(a(),1),f=n(),p=({defaultValue:e,disabled:n,disableYes:r=!1,required:a=!0,label:c,name:l,testIdPrefix:u,onChange:d,tooltip:p,loading:m=!1,additionalInfo:h})=>{let{formatMessage:g}=t(),_=[{value:!0,label:g({id:`app.yes`}),key:`yes`},{value:!1,label:g({id:`app.no`}),key:`no`}],v=u?`${u}-`:``;return(0,f.jsx)(o.Item,{name:l,label:c,rules:[{required:a,message:(0,f.jsx)(i,{id:`error.fieldIsRequired`})}],tooltip:p||null,required:a,extra:h,children:(0,f.jsx)(s.Group,{optionType:`button`,defaultValue:e,onChange:e=>d&&d(e.target.value),disabled:m,children:_.map(e=>(0,f.jsx)(s.Button,{value:e.value,"data-testid":`${v}${e.key}`,disabled:n||m||r&&e.value===!0,children:e.label},e.key))})})},m=function(e){return e.USD=`usd`,e.EUR=`eur`,e}({}),h=e=>`AT.BE.BG.HR.CY.CZ.DK.EE.FI.FR.DE.GR.HU.IE.IT.LV.LT.LU.MT.NL.PL.PT.RO.SK.SI.ES.SE.NO.IS.LI.CH.RS.BA.ME.MK.AL.MD.UA.BY.TR.GE.AM.AZ.AD.MC.SM.VA`.split(`.`).includes(e)?`eur`:`usd`,g={[c.en]:`en-US`,[c.fr]:`fr-FR`,[c.de]:`de-DE`,[c.es]:`es-ES`,[c.pt]:`pt-BR`,[c.it]:`it-IT`,[c.pl]:`pl-PL`,[c.tr]:`tr-TR`,[c.sv]:`sv-SE`};function _({amount:e,currency:t,locale:n}){var r;let i=(r=g[n==null?c.en:n])==null?`en-US`:r,a=(t==null?`usd`:t).toUpperCase();return new Intl.NumberFormat(i,{style:`currency`,currency:a,minimumFractionDigits:e%1==0?0:2,maximumFractionDigits:2}).format(e)}function v(){var e,t;let{authCompany:n}=r(u),{locale:i}=r(l),a=(n==null||(e=n.billing)==null?void 0:e.defaultCurrency)||`usd`,o=(t=i==null?void 0:i.locale)==null?`en`:t;return{currency:a,formatPrice:(0,d.useCallback)(e=>_({amount:e,currency:a,locale:o}),[a,o])}}export{p as i,m as n,h as r,v as t};
2//# sourceMappingURL=use-currency-FGaxjrc3.js.map

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.