{"version":3,"sources":["../../../src/utils/properties.ts","../../../src/accounting/invoices/links.ts"],"sourcesContent":["export const hasProperty = (object: any, property: string): boolean => {\r\n  if (Boolean(object) && typeof object === 'object') {\r\n    return property in object;\r\n  }\r\n\r\n  return false;\r\n};\r\n","import type { Invoice } from 'xero-node';\r\n\r\nimport { hasProperty } from '../../utils/properties';\r\n\r\nexport const getInvoiceLink = (invoice: Invoice | string): string => {\r\n  return `https://invoicing.xero.com/view/${\r\n    (hasProperty(invoice, 'invoiceID')\r\n      ? (invoice as Invoice).invoiceID\r\n      : invoice) || 'null-or-empty-invoice-id'\r\n  }`;\r\n};\r\n"],"mappings":";AAAO,IAAM,cAAc,CAAC,QAAa,aAA8B;AACrE,MAAI,QAAQ,MAAM,KAAK,OAAO,WAAW,UAAU;AACjD,WAAO,YAAY;AAAA,EACrB;AAEA,SAAO;AACT;;;ACFO,IAAM,iBAAiB,CAAC,YAAsC;AACnE,SAAO,oCACJ,YAAY,SAAS,WAAW,IAC5B,QAAoB,YACrB,YAAY,0BAClB;AACF;","names":[]}