var inlineStyleApplier, self, tools, _common;

tools = require('../../tools');

_common = require('./_common');

module.exports = inlineStyleApplier = self = {
  applyTo: function(el, style) {
    var ret;
    ret = _common.getStyleTagsFor(style);
    if (style.marginLeft != null) {
      ret.before = (tools.repeatString("&nbsp;", parseInt(style.marginLeft))) + ret.before;
    }
    if (style.marginRight != null) {
      ret.after += tools.repeatString("&nbsp;", parseInt(style.marginRight));
    }
    if (style.paddingLeft != null) {
      ret.before += tools.repeatString("&nbsp;", parseInt(style.paddingLeft));
    }
    if (style.paddingRight != null) {
      ret.after = (tools.repeatString("&nbsp;", parseInt(style.paddingRight))) + ret.after;
    }
    return ret;
  }
};
