//
// CustomDualLeftRightCell.m
// Project
//
// Created by ziv on 2017/11/14.
//

#import "CustomDualLeftRightCell.h"
#import "ImageUtils.h"
#import "UIConstants.h"
#import <PureLayout/PureLayout.h>

@interface CustomDualLeftRightCell ()
@property (nonatomic, weak) IBOutlet UIView *leftReferenceView;
@property (nonatomic, weak) IBOutlet UIView *rightReferenceView;
@property (nonatomic, weak) IBOutlet UIView *separatorView;
@property (nonatomic, weak) IBOutlet NSLayoutConstraint *separatorWidth;
@end

@implementation CustomDualLeftRightCell

- (void)awakeFromNib {
	[super awakeFromNib];
	self.separatorView.backgroundColor = [UIColor groupTableViewBackgroundColor];
	self.separatorWidth.constant = 1 / [UIScreen mainScreen].scale;
	[self.leftSelectionButton setBackgroundImage:[ImageUtils imageWithColor:[UIColor darkGrayColor]] forState:UIControlStateHighlighted];
	[self.rightSelectionButton setBackgroundImage:[ImageUtils imageWithColor:[UIColor darkGrayColor]] forState:UIControlStateHighlighted];
	[self.leftReferenceView autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.imageView withOffset:[UIConstants defaultTableViewCellLayoutInsets].left];
}

@end
