text: "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_react=_interopRequireDefault(require("react")),_styledComponents=_interopRequireDefault(require("styled-components")),_validators=require("../../../utils/validators"),_=require("../../");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _taggedTemplateLiteral(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}/**
   * Generation of stars
   */var getStars=function(a){for(var b=[],c=0;5>c;c++)b.push(/*#__PURE__*/_react["default"].createElement(SliderTestimonySlideStar,{src:"common/icon/unicolor/star",color:c<a?"yellow":"lightGrey",width:"1.294rem",key:c}));return b},SliderTestimonySlideStar=(0,_styledComponents["default"])(function(a){return/*#__PURE__*/_react["default"].createElement(_.Svg,a)})(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n  margin-left: 0.765rem;\n  display: inline-block;\n\n  @media screen and (max-width: ",") {\n    width: 1rem;\n    margin-left: 0.588rem;\n  }\n"])),_.UI.breakpoints.mobile),SliderTestimonySlideStyled=_styledComponents["default"].div(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n  /* Mobile mode */\n  @media screen and (max-width: ",") {\n    padding: 2rem 1rem 3rem;\n  }\n"])),_.UI.breakpoints.mobile),SliderTestimonySlideProfilPicture=(0,_styledComponents["default"])(function(a){return/*#__PURE__*/_react["default"].createElement(_.AdaptiveImage,a)})(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n  width: 2.941rem;\n  height: 2.941rem;\n  margin-right: 1rem;\n\n  /* Mobile mode */\n  @media screen and (max-width: ",") {\n    width: 3.125rem;\n    height: 3.125rem;\n  }\n"])),_.UI.breakpoints.mobile),SliderTestimonySlideHeader=(0,_styledComponents["default"])(function(a){return/*#__PURE__*/_react["default"].createElement(_.Flex,a)})(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n  justify-content: space-between;\n\n  /* Mobile mode */\n  @media screen and (max-width: ",") {\n    flex-direction: column;\n    align-items: flex-start;\n  }\n"])),_.UI.breakpoints.mobile),SliderTestimonySlideLogo=(0,_styledComponents["default"])(function(a){return/*#__PURE__*/_react["default"].createElement(_.AdaptiveImage,a)})(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n  height: 3rem;\n  margin-right: 1rem;\n"]))),SliderTestimonySlideCard=_styledComponents["default"].div(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n  padding: 1.647rem 2.588rem;\n  @media screen and (max-width: ",") {\n    border-radius: 1.176rem;\n    background-color: ",";\n    box-shadow: ",";\n  }\n"])),_.UI.breakpoints.mobile,_.UI.colors.white,_.UI.shadows.slider),SliderTestimonySlideStars=_styledComponents["default"].div(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n  /* Mobile mode */\n  @media screen and (max-width: ",") {\n    margin-left: 3.5rem;\n\n    .text--size-small {\n      text-align: left;\n      margin-left: 0.588rem;\n    }\n  }\n"])),_.UI.breakpoints.mobile),SliderTestimonySlideTextOrganisation=(0,_styledComponents["default"])(function(a){return/*#__PURE__*/_react["default"].createElement(_.Text,a)})(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n  flex: 1;\n"]))),SliderTestimonySlideFlexOrganisation=(0,_styledComponents["default"])(function(a){return/*#__PURE__*/_react["default"].createElement(_.Flex,a)})(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n  @media screen and (max-width: ",") {\n    align-items: flex-start;\n  }\n"])),_.UI.breakpoints.mobile),SliderTestimonySlide=function(a){var b=a.user,c=a.testimony,d=a.organisation,e=a.maxLenghtTestimony,f=void 0===e?450:e,g=a.color,h=(0,_validators.checkSize)(c.text,f),i=h.error,j=h.response;return/*#__PURE__*/_react["default"].createElement(SliderTestimonySlideStyled,null,/*#__PURE__*/_react["default"].createElement(SliderTestimonySlideCard,null,/*#__PURE__*/_react["default"].createElement(SliderTestimonySlideHeader,null,/*#__PURE__*/_react["default"].createElement(_.Flex,{justifyContent:"left",custom:!1},/*#__PURE__*/_react["default"].createElement(SliderTestimonySlideProfilPicture,{src:b.picture,maxDpi:1,roundShape:!0}),/*#__PURE__*/_react["default"].createElement(_.Text,{color:g||"extraDarkGrey",align:"left"},/*#__PURE__*/_react["default"].createElement("b",null,b.name),/*#__PURE__*/_react["default"].createElement("br",null),b.position)),/*#__PURE__*/_react["default"].createElement(SliderTestimonySlideStars,null,getStars(c.note),/*#__PURE__*/_react["default"].createElement("br",null),/*#__PURE__*/_react["default"].createElement(_.Text,{size:"small",align:"right",color:g},c.origin))),/*#__PURE__*/_react["default"].createElement(_.Space,{size:"big"}),/*#__PURE__*/_react["default"].createElement(_.Text,{align:"left",color:g},i?/*#__PURE__*/_react["default"].createElement("span",{className:"error"},j):j),/*#__PURE__*/_react["default"].createElement(_.Space,{size:"big"}),/*#__PURE__*/_react["default"].createElement(SliderTestimonySlideFlexOrganisation,{alignItems:"center"},/*#__PURE__*/_react["default"].createElement(SliderTestimonySlideLogo,{src:d.logo,alt:d.name,maxDpi:1}),/*#__PURE__*/_react["default"].createElement(SliderTestimonySlideTextOrganisation,{color:g||"extraDarkGrey",align:"left",size:"small"},/*#__PURE__*/_react["default"].createElement("b",null,d.name),/*#__PURE__*/_react["default"].createElement("span",{className:"hidden-mobile"},/*#__PURE__*/_react["default"].createElement("br",null),d.resume))),/*#__PURE__*/_react["default"].createElement(_.Text,{color:"extraDarkGrey",align:"left",size:"small",className:"hidden-desktop"},d.resume)))},_default=SliderTestimonySlide;/**
   * Style
   */exports["default"]=_default;