{
  "version": 3,
  "sources": ["../../src/surface/hook.ts"],
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\nexport function useSurface(props) {\n  const {\n    backgroundSize = 12,\n    borderBottom = false,\n    borderLeft = false,\n    borderRight = false,\n    borderTop = false,\n    className,\n    variant = 'primary',\n    ...otherProps\n  } = useContextSystem(props, 'Surface');\n  const cx = useCx();\n  const classes = useMemo(() => {\n    const sx = {\n      borders: styles.getBorders({\n        borderBottom,\n        borderLeft,\n        borderRight,\n        borderTop\n      })\n    };\n    return cx(styles.Surface, sx.borders, styles.getVariant(variant, `${backgroundSize}px`, `${backgroundSize - 1}px`), className);\n  }, [backgroundSize, borderBottom, borderLeft, borderRight, borderTop, className, cx, variant]);\n  return {\n    ...otherProps,\n    className: classes\n  };\n}"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAwB;AAKxB,qBAAiC;AACjC,aAAwB;AACxB,oBAAsB;AACf,SAAS,WAAW,OAAO;AAChC,QAAM;AAAA,IACJ,iBAAiB;AAAA,IACjB,eAAe;AAAA,IACf,aAAa;AAAA,IACb,cAAc;AAAA,IACd,YAAY;AAAA,IACZ;AAAA,IACA,UAAU;AAAA,IACV,GAAG;AAAA,EACL,QAAI,iCAAiB,OAAO,SAAS;AACrC,QAAM,SAAK,qBAAM;AACjB,QAAM,cAAU,wBAAQ,MAAM;AAC5B,UAAM,KAAK;AAAA,MACT,SAAgB,kBAAW;AAAA,QACzB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH;AACA,WAAO,GAAU,gBAAS,GAAG,SAAgB,kBAAW,SAAS,GAAG,cAAc,MAAM,GAAG,iBAAiB,CAAC,IAAI,GAAG,SAAS;AAAA,EAC/H,GAAG,CAAC,gBAAgB,cAAc,YAAY,aAAa,WAAW,WAAW,IAAI,OAAO,CAAC;AAC7F,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW;AAAA,EACb;AACF;",
  "names": []
}
