/*! For license information please see b636e942651e29772c7a776b65f107ba.js.LICENSE.txt */
"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([["sub-common/b636e942651e29772c7a776b65f107ba"],{"./src/pages/orderDetails/components/remark/index.tsx":function(e,a,n){var u=n("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");var r=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");var l=n("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");var t=n("./node_modules/react/cjs/react.production.min.js");var o=n("./src/pages/orderDetails/components/remark/index.module.scss");var s=n("./src/components/tag/index.tsx");var i=n("./node_modules/react/cjs/react-jsx-runtime.production.min.js");var d=[{id:1,value:"拿色片"},{id:2,value:"顺丰"},{id:3,value:"客户自提"},{id:4,value:"加急一下"},{id:5,value:"物流到"},{id:6,value:"中台秀银"},{id:7,value:"中台晓茵"},{id:8,value:"中台淑婷"},{id:9,value:"中台结慧"},{id:10,value:"辛苦了"}];var c=function Remark(e){var a=e.onBlur,n=e.onSave,c=e.defaultValue,m=c===void 0?"":c,v=e.recommend,p=v===void 0?true:v;var f=(0,t.useState)({number:0,value:"",count:200}),j=(0,r["default"])(f,2),x=j[0],h=j[1];var _=function getDesc(e){var a=e;if(e.length>x.count){a=e.slice(0,x.count)}h((0,u["default"])((0,u["default"])({},x),{},{number:a.length,value:a}))};var b=function setSave(){n===null||n===void 0?void 0:n(x.value)};(0,t.useEffect)((function(){_(m)}),[m]);var w=function onClickTag(e){h((function(a){return(0,u["default"])((0,u["default"])({},a),{},{value:a.value+e.value})}))};return(0,i.jsxs)(l.View,{className:o["default"].order_popup,children:[(0,i.jsx)(l.View,{className:o["default"].order_popup_title,children:"编辑备注"}),(0,i.jsxs)(l.View,{className:o["default"].order_popup_input,children:[(0,i.jsx)(l.Textarea,{placeholder:"请添加备注",value:x===null||x===void 0?void 0:x.value,maxlength:x.count,cursorSpacing:100,onInput:function onInput(e){return _(e.detail.value)},onBlur:function onBlur(e){return a===null||a===void 0?void 0:a(e)}}),(0,i.jsxs)(l.View,{className:o["default"].descDataNum,children:[x.number,"/",x.count]})]}),p?(0,i.jsxs)(l.View,{children:[(0,i.jsx)(l.View,{className:o["default"].recommend_remark,children:"推荐备注"}),(0,i.jsx)(l.View,{className:o["default"].recommend_remark_content,children:d.map((function(e){return(0,i.jsx)(s["default"],{type:"info",plain:true,onClick:function onClick(){return w(e)},circle:true,customClassName:o["default"].tag,children:e.value},e.id)}))})]}):null,(0,i.jsx)(l.View,{className:o["default"].order_save_address,onClick:function onClick(){return b()},children:"保存"})]})};a["default"]=c}}]);