"use strict";var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard"),_interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.defaultProps=exports.propTypes=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),_possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")),_getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")),_inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_objectSpread2=_interopRequireDefault(require("@babel/runtime/helpers/objectSpread")),_react=_interopRequireWildcard(require("react")),_propTypes=_interopRequireDefault(require("prop-types")),_classnames=_interopRequireDefault(require("classnames")),_componentHelper=require("../../shared/component-helper"),_Button=_interopRequireDefault(require("../../components/button/Button")),renderProps={},propTypes={prev_href:_propTypes.default.string,next_href:_propTypes.default.string,prev_text:_propTypes.default.string,next_text:_propTypes.default.string,prev_title:_propTypes.default.string,next_title:_propTypes.default.string,class:_propTypes.default.string,className:_propTypes.default.string,children:_propTypes.default.oneOfType([_propTypes.default.string,_propTypes.default.node,_propTypes.default.func])};exports.propTypes=propTypes;var defaultProps=(0,_objectSpread2.default)({prev_href:null,next_href:null,prev_text:"Back",next_text:"Next",prev_title:"Go back",next_title:"Go next",class:null,className:null,children:null},renderProps);exports.defaultProps=defaultProps;var ActionNav=function(e){function t(){return(0,_classCallCheck2.default)(this,t),(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(t).apply(this,arguments))}return(0,_inherits2.default)(t,e),(0,_createClass2.default)(t,[{key:"render",value:function(){var e=this.props,t=e.children,r=e.prev_href,a=e.next_href,n=e.prev_text,l=e.next_text,p=e.prev_title,i=e.next_title,s=e.className,o=e.class,u={className:(0,_classnames.default)("dnb-action-nav","dnb-belt",s,o)},_=r&&a;return(0,_componentHelper.validateDOMAttributes)(this.props,u),_react.default.createElement("div",u,_react.default.createElement("div",{className:"dnb-width-limit"},_react.default.createElement("div",{className:"dnb-action-nav__inner"},_&&_react.default.createElement(_react.default.Fragment,null,_react.default.createElement("div",{className:"dnb-action-nav__left"},r&&_react.default.createElement("div",{className:"dnb-action-nav__item"},_react.default.createElement(_Button.default,{type:"button",text:n,title:p,variant:"secondary",icon_position:"left",icon:"chevron_left",href:r})),a&&_react.default.createElement("div",{className:"dnb-action-nav__item"},_react.default.createElement(_Button.default,{text:l,title:i,variant:"primary",icon:"chevron_right",href:a}))),_react.default.createElement("div",{className:"dnb-action-nav__right"},t))||t)))}}],[{key:"enableWebComponent",value:function(){(0,_componentHelper.registerElement)(t.tagName,t,defaultProps)}}]),t}(_react.PureComponent);exports.default=ActionNav,(0,_defineProperty2.default)(ActionNav,"tagName","dnb-action-nav"),(0,_defineProperty2.default)(ActionNav,"defaultProps",defaultProps),ActionNav.propTypes="production"!==process.env.NODE_ENV?propTypes:{};
//# sourceMappingURL=ActionNav.js.map
